Extended example: using multiple keys
Copy the source data below and paste it to a new spreadsheet:
A | B | C | D | |
---|---|---|---|---|
1 | weight | height | age | name |
2 | 10 | 5 | 6 | foo |
3 | 10 | 5 | 3 | bar |
4 | 15 | 10 | 8 | baz |
5 | 15 | 10 | 4 | oaf |
6 | 10 | 12 | 6 | cool |
In A7 cell, group by "weight", then by "age"
=GROUP_BY(FRAME(A1:D6), "weight", "age")
or (equivalent):
=GROUP_BY(FRAME(A1:D6), {"weight"; "age"})
Open the result in nested frame view. Observe and open grouped data in "by_{name}" columns.
Nested: grouped by "weight" column
weight | by_weight | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 10 | Nested: data by "weight" = 10
| ||||||||||||||||||||||||||||||||||
2 | 15 | Nested: data by "weight" = 15
|