TopicsCheat sheetLessons
Lurndo › Excel › FILTER

Learning Excel: FILTER

Filtering with a formula

Visitors want to know where the queue is short, and parents ask which rides their child can already go on. Will wants those lists on the screen, and they have to stay right every time the queue times change.

FILTER

FILTER shows only the rows that meet a condition. The first argument is what you want to see, the second the condition.

=FILTER(A2:A13,C2:C13>30) gives the rides with a queue of more than 30 minutes. For each row, the condition is TRUE or FALSE.

G2
fx

=FILTER(A2:A13,C2:C13>30)

ABCDEFGHIJKLMN
1RideZoneQueue timeVisitorsHeightResultZoneWater
2WhirlwindWater451,200120WhirlwindMax. wait20
3Haunted CastleAdventure25800100Log FlumeChild height105
4Log FlumeWater351,500110Corkscrew
5DodgemsFunfair10650130Rocket
6Big WheelFunfair1590090
7Pirate ShipAdventure301,100110
8Pedal BoatsWater540085
9CorkscrewAdventure501,700140
10Mini TrainKidsland1050085
11RocketSpace401,300130
12CarouselKidsland560085
13TeacupsFunfair1070095
14

When nothing is left

If no row meets the condition, FILTER gives #CALC!. A third argument says what to show instead.

No queue is longer than an hour, so =FILTER(A2:A13,C2:C13>60,"none") shows none.

G2
fx

=FILTER(A2:A13,C2:C13>60,"none")

ABCDEFGHIJKLMN
1RideZoneQueue timeVisitorsHeightResultZoneWater
2WhirlwindWater451,200120noneMax. wait20
3Haunted CastleAdventure25800100Child height105
4Log FlumeWater351,500110
5DodgemsFunfair10650130
6Big WheelFunfair1590090
7Pirate ShipAdventure301,100110
8Pedal BoatsWater540085
9CorkscrewAdventure501,700140
10Mini TrainKidsland1050085
11RocketSpace401,300130
12CarouselKidsland560085
13TeacupsFunfair1070095
14

Two conditions

Put two conditions in brackets and multiply them: =FILTER(A2:A13,(B2:B13="Water")*(C2:C13<30)) gives the water rides with a queue of less than 30 minutes. TRUE counts as 1 and FALSE as 0, so only where both are true is a 1 left.

With + instead of *, one of the two conditions is enough.

G2
fx

=FILTER(A2:A13,(B2:B13="Water")*(C2:C13<30))

ABCDEFGHIJKLMN
1RideZoneQueue timeVisitorsHeightResultZoneWater
2WhirlwindWater451,200120Pedal BoatsMax. wait20
3Haunted CastleAdventure25800100Child height105
4Log FlumeWater351,500110
5DodgemsFunfair10650130
6Big WheelFunfair1590090
7Pirate ShipAdventure301,100110
8Pedal BoatsWater540085
9CorkscrewAdventure501,700140
10Mini TrainKidsland1050085
11RocketSpace401,300130
12CarouselKidsland560085
13TeacupsFunfair1070095
14

Try it yourself

Put the rides from the zone in N1 in G2.

ABCDEFGHIJKLMN
1RideZoneQueue timeVisitorsHeightResultZoneWater
2WhirlwindWater451,200120Max. wait20
3Haunted CastleAdventure25800100Child height105
4Log FlumeWater351,500110
5DodgemsFunfair10650130
6Big WheelFunfair1590090
7Pirate ShipAdventure301,100110
8Pedal BoatsWater540085
9CorkscrewAdventure501,700140
10Mini TrainKidsland1050085
11RocketSpace401,300130
12CarouselKidsland560085
13TeacupsFunfair1070095
14
G2

Ready for more?

The full lesson has 5 exercises, from easy to challenging, with hints, points and a streak you can build.

Start the lesson
← PreviousSpillNext →Sorting with a formula

SQL

  • Topics
  • All lessons
  • Cheat sheet

Excel

  • Topics
  • All lessons
  • Shortcuts

HTML & CSS

  • About the course
  • All lessons

Lurndo

  • Dashboard
  • Leaderboard
  • Premium
  • Account
  • Privacy
Nederlands