TopicsCheat sheetLessons
Lurndo › Excel › Combining arrays

Learning Excel: Combining arrays

Combining

Will wants a small overview per zone: the zones in alphabetical order, with how many rides and how many visitors next to each. If a zone is added next year, the overview has to grow with it by itself.

One formula inside another

A list can be the argument of another function. In =SORT(UNIQUE(B2:B13)), UNIQUE first makes the list of zones, and SORT puts it in alphabetical order.

It works with FILTER too: =SUM(FILTER(D2:D13,B2:B13="Water")) adds up only the visitors of the water rides.

G2
fx

=SORT(UNIQUE(B2:B13))

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

Referring to a list

With a # after a cell, you refer to the whole list that spills from that cell. G2# is the list of zones, however long it gets.

In H2, =COUNTIF(B2:B13,G2#) counts the rides of each zone, and spills too: one number per zone.

H2
fx

=COUNTIF(B2:B13,G2#)

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

Try it yourself

How many visitors did the zone in N1 have today? Add them up in G2 with FILTER.

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
← PreviousSorting with a formulaNext →Names in 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