Table:
0
A
B
C
D
1
location code
location name
location description
reference locations
2
b
Brazil
3
c
Canada
4
e
Edinburgh
5
n
Nanjing
6
x
Xiamen

Questions and formulas:
Question: Total number of location codes
Formula: ROWS(UNIQUE(A1))
Formula2: ROWS(UNIQUE(A2:A6))
Level: easy
Question: The number of location codes.
Formula: ROWS(UNIQUE(A1))
Formula2: ROWS(UNIQUE(A2:A6))
Level: easy
Question: Show all location codes and names
Formula: UNIQUE(HSTACK(A1,B1))
Formula2: UNIQUE(HSTACK(A2:A6,B2:B6))
Level: easy
Question: The location codes and names.
Formula: UNIQUE(HSTACK(A1,B1))
Formula2: UNIQUE(HSTACK(A2:A6,B2:B6))
Level: easy
Question: Code X location names and descriptions
Formula: LET(query1,FILTER(A1:D1,A1="x"),UNIQUE(CHOOSECOLS(query1,2,3)))
Formula2: LET(query1,FILTER(A2:D6,A2:A6="x"),UNIQUE(CHOOSECOLS(query1,2,3)))
Level: hard
Question: Canada's location code
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:D1,B1="canada"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:D6,B2:B6="canada"),1))
Level: medium
Question: What Canada's location code?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:D1,B1="canada"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:D6,B2:B6="canada"),1))
Level: medium
Question: How many location codes?
Formula: ROWS(UNIQUE(A1))
Formula2: ROWS(UNIQUE(A2:A6))
Level: easy
Question: What are the location codes and names?
Formula: UNIQUE(HSTACK(A1,B1))
Formula2: UNIQUE(HSTACK(A2:A6,B2:B6))
Level: easy
Question: The location names and descriptions for code x.
Formula: LET(query1,FILTER(A1:D1,A1="x"),UNIQUE(CHOOSECOLS(query1,2,3)))
Formula2: LET(query1,FILTER(A2:D6,A2:A6="x"),UNIQUE(CHOOSECOLS(query1,2,3)))
Level: hard
Question: The location code for Canada.
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:D1,B1="canada"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:D6,B2:B6="canada"),1))
Level: medium
Question: What is the location code for Canada?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:D1,B1="canada"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:D6,B2:B6="canada"),1))
Level: medium