SpeakersAgendaMasterclassesVisitor Info
Partners
Event PartnersParticipating Companies
ContactGet Tickets
0

Your Cart

  • :
Remove
Subtotal:
Pay with browser.
Continue to Checkout
No items found.
Product is not available in this quantity.
March 24, 2023

How to use multiple criteria in the FILTER function

Ever wanted to return a subset of a dataset rather than the whole thing? The FILTER function lets us sieve a table to extract only the desired rows based on criteria.

Check out this quick video to learn how to do this!

@globalexcelsummit The FILTER function lets us sieve a table to extract only the desired rows based on criteria. In the video example, a table called tblProducts houses product data, and we want to return only the items that cost under Β£100. This formula achieves the result: =π™΅π™Έπ™»πšƒπ™΄πš(πšπš‹πš•π™Ώπš›πš˜πšπšžπšŒπšπšœ, πšπš‹πš•π™Ώπš›πš˜πšπšžπšŒπšπšœ[π™Ώπš›πš’πšŒπšŽ (Β£)]<𝟷00 ) The table name is referenced in πšŠπš›πš›πšŠπš’ to return all columns, whilst the condition is specified in πš’πš—πšŒπš•πšžπšπšŽ to return all rows where the value in the Price column is less than 100. The condition evaluates to an array of TRUE and FALSE values that represent the rows and indicate which ones to return: {πšƒπšπš„π™΄;π™΅π™°π™»πš‚π™΄;πšƒπšπš„π™΄;πšƒπšπš„π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;πšƒπšπš„π™΄;πšƒπšπš„π™΄;π™΅π™°π™»πš‚π™΄;πšƒπšπš„π™΄;πšƒπšπš„π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;πšƒπšπš„π™΄;πšƒπšπš„π™΄} Often, you're likely to require more than one criterion, though. The function provides no obvious way of doing this. However, there is a way: =π™΅π™Έπ™»πšƒπ™΄πš(πšπš‹πš•π™Ώπš›πš˜πšπšžπšŒπšπšœ, (πšπš‹πš•π™Ώπš›πš˜πšπšžπšŒπšπšœ[π™Ώπš›πš’πšŒπšŽ (Β£)]<𝟷00) * (πšπš‹πš•π™Ώπš›πš˜πšπšžπšŒπšπšœ[πšπšŠπšπš’πš—πš]>=𝟺) ) Building on the same condition as the first example, an asterisk is added after, which is the multiplication operator representing AND criteria. The second condition then returns all rows with a value greater than or equal to 4 in the Rating column. This calculation is taking place: {𝟷;0;𝟷;𝟷;0;0;𝟷;𝟷;0;𝟷;𝟷;0;0;0;0;0;0;0;𝟷;𝟷} * {0;𝟷;𝟷;0;𝟷;0;0;𝟷;0;0;0;𝟷;0;0;0;𝟷;0;𝟷;𝟷;0} Because two conditions are multiplied, the TRUE and FALSE array values are coerced into 1s and 0s. Multiplying by 0 is always 0, so both respective values must equal 1 for their row to be returned. Finally, if using multiple conditions, be sure to enclose each one in brackets to avoid any unusual results. #exceleration #excel #globalexcelsummit ♬ original sound - globalexcelsummit

In the example, a table called tblProducts houses product data, and we want to return only the items that cost under Β£100.

This formula achieves the result:

=π™΅π™Έπ™»πšƒπ™΄πš(πšπš‹πš•π™Ώπš›πš˜πšπšžπšŒπšπšœ,
πšπš‹πš•π™Ώπš›πš˜πšπšžπšŒπšπšœ[π™Ώπš›πš’πšŒπšŽ (Β£)]<𝟷00
)

The table name is referenced in πšŠπš›πš›πšŠπš’ to return all columns, whilst the condition is specified in πš’πš—πšŒπš•πšžπšπšŽ to return all rows where the value in the Price column is less than 100.

The condition evaluates to an array of TRUE and FALSE values that represent the rows and indicate which ones to return:

{πšƒπšπš„π™΄;π™΅π™°π™»πš‚π™΄;πšƒπšπš„π™΄;πšƒπšπš„π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;
πšƒπšπš„π™΄;πšƒπšπš„π™΄;π™΅π™°π™»πš‚π™΄;πšƒπšπš„π™΄;πšƒπšπš„π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;
π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;π™΅π™°π™»πš‚π™΄;πšƒπšπš„π™΄;πšƒπšπš„π™΄}

Often, you're likely to require more than one criterion, though. The function provides no obvious way of doing this. However, there is a way:

=π™΅π™Έπ™»πšƒπ™΄πš(πšπš‹πš•π™Ώπš›πš˜πšπšžπšŒπšπšœ,(πšπš‹πš•π™Ώπš›πš˜πšπšžπšŒπšπšœ[π™Ώπš›πš’πšŒπšŽ (Β£)]<𝟷00)*(πšπš‹πš•π™Ώπš›πš˜πšπšžπšŒπšπšœ[πšπšŠπšπš’πš—πš]>=𝟺))

Building on the same condition as the first example, an asterisk is added after, which is the multiplication operator representing AND criteria. The second condition then returns all rows with a value greater than or equal to 4 in the Rating column.

This calculation is taking place:

{𝟷;0;𝟷;𝟷;0;0;𝟷;𝟷;0;𝟷;𝟷;0;0;0;0;0;0;0;𝟷;𝟷}
*
{0;𝟷;𝟷;0;𝟷;0;0;𝟷;0;0;0;𝟷;0;0;0;𝟷;0;𝟷;𝟷;0}

Because two conditions are multiplied, the TRUE and FALSE array values are coerced into 1s and 0s. Multiplying by 0 is always 0, so both respective values must equal 1 for their row to be returned.

Finally, if using multiple conditions, be sure to enclose each one in brackets to avoid any unusual results.

Like this guide? Check out our Video Tutorials to discover other ways to power up your Excel skills!

Join the Master Club

Your exclusive all-access pass to our entire digital learning experience for a whole year.

Get 365-Day Digital Pass
Pages
Home
20212022202320242025
About UsFAQsOnline CoursesBlogContact
LEGALS
Privacy PolicyTerms of Service
Subscribe to our newsletter!
The Global Excel Summit is a premium global conference bringing together thebrightest minds from the world of Excel.
Β© 2025 The Global Excel Summit is organised and managed by DATEL Productions Limited, a company incorporatedin England and Wales (no. 10106893) and registered at Suite 407, 95 Wilton Road, London SW1V 1BZ, UK.