Table:
0
A
B
C
D
E
F
G
H
1
2013 Republican primary
Manhattan
The Bronx
Brooklyn
Queens
Staten Island
Total
%
2
Joe Lhota
9,211
1,860
6,995
8,758
5,412
32236
52.7%
3
Joe Lhota
70.5%
52.9%
47.6%
51.0%
42.8%
32236
52.7%
4
John Catsimatidis
3,139
1,281
6,723
6,945
6,776
24864
40.7%
5
John Catsimatidis
24.0%
36.4%
45.7%
40.5%
53.5%
24864
40.7%
6
George McDonald
683
369
940
1,456
451
3899
6.4%
7
George McDonald
5.2%
10.5%
6.4%
8.5%
3.6%
3899
6.4%
8
all Write-In votes
34
8
42
9
19
112
0.2%
9
T O T A L
13,067
3,518
14,700
17,168
12,658
61111
100.0%

Questions and formulas:
Question: What was Staten Island when Brooklyn was 940?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:H1,D1=940),6))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:H9,D2:D9=940),6))
Level: medium
Question: What was the total number in Manhattan when Staten Island was 12,658?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:H1,F1=12658),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:H9,F2:F9=12658),2))
Level: medium
Question: What was the total in Brooklyn when Manhattan was 3,139?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:H1,B1=3139),4))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:H9,B2:B9=3139),4))
Level: medium
Question: Who was the republican candidate in 2013 when Staten Island was 451?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:H1,F1=451),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:H9,F2:F9=451),1))
Level: medium
Question: What was the amount in Staten Island when The Bronx was 1,281?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:H1,C1=1281),6))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:H9,C2:C9=1281),6))
Level: medium