Today, we want to learn how advanced fil­ters work in Excel, espe­cial­ly between conditions. 

Advanced Fil­ters and between condition

Let’s start. When we have our dataset, we write our advanced fil­ter con­di­tions in cells. We need to have a head­er and a con­di­tion for this head­er. If we write con­di­tions in one row, all of them are con­nect­ed with the final cri­te­ria. It means that each con­di­tion should be met in order to take out the whole row from our dataset (1). When we add con­di­tions to fur­ther rows, it meas that it’s an ‘or’ con­di­tion (2). In this case, we will look for straw­ber­ries or plums. If we want to cre­ate a between con­di­tion, we need to write the head­er two times (3) in order to cre­ate a com­mon part. In our case, we are look­ing for straw­ber­ries that are equal or greater than 500 and small­er or equal to 750, and in the case of plums we want the plums that are equal or greater than 300 and small­er or equal to 500. We have to remem­ber that those con­di­tions should make a com­mon part (Fig. 1)

Dataset with two headers
Fig. 1 Dataset with two headers

When we want to go to advanced fil­ters, we need to select one cell in our dataset (1), then go to the Data tab (2), then Advanced fil­ters (3). In the Advanced fil­ter win­dow press the Copy to anoth­er loca­tion radio but­ton (4), and select the cri­te­ria range (5). The last step is select­ing the tar­get cell, which will be cell E6 (6) (Fig. 2)

 Creating a table
Fig. 2 Cre­at­ing a table

Remem­ber that if con­di­tions are writ­ten in one row, they are com­bined as an ‘and’ con­di­tion, and when they are in sep­a­rate rows, they are com­bined as an ‘or’ con­di­tion. More­over, we can add an emp­ty con­di­tion for dif­fer­ent head­ers. But, since there isn’t any con­di­tion in the Date col­umn, we can select the range with­out it. In fig­ure 3, we can see the final table with sales of plums that are between 300 and 500 and sales of straw­ber­ries that are between 500 and 750, togeth­er with all pos­si­ble dates for those con­di­tions (Fig. 3)

 Final table
Fig. 3 Final table

https://www.youtube.com/watch?v=PihjS8Bq-vI&t