Table:
0
A
B
C
D
E
F
1
District
Incumbent
Party
First elected
Result
Candidates
2
Virginia 4
William McCoy
Democratic-Republican
1811
Re-elected
William McCoy (DR)
3
Virginia 5
John Floyd
Democratic-Republican
1817
Re-elected
John Floyd (DR)
4
Virginia 6
Alexander Smyth
Democratic-Republican
1817
Re-elected
Alexander Smyth (DR)
5
Virginia 7
Ballard Smith
Democratic-Republican
1815
Retired Democratic-Republican hold
William Smith (DR) 53.2% James Wilson (DR) 46.8%
6
Virginia 11
Philip P. Barbour
Democratic-Republican
1814 (special)
Re-elected
Philip P. Barbour (DR)
7
Virginia 12
Robert S. Garnett
Democratic-Republican
1817
Re-elected
Robert S. Garnett (DR) 100%
8
Virginia 14
William A. Burwell
Democratic-Republican
1806 (special)
Retired Democratic-Republican hold
Jabez Leftwich (DR) 93.5% James Calloway (DR) 6.5%
9
Virginia 17
William S. Archer
Democratic-Republican
1820 (special)
Re-elected
William S. Archer (DR) 100%
10
Virginia 18
Mark Alexander
Democratic-Republican
1819
Re-elected
Mark Alexander (DR) 100%
11
Virginia 19
James Jones
Democratic-Republican
1819
Re-elected
James Jones (DR)
12
Virginia 20
John C. Gray
Democratic-Republican
1820 ( special )
Lost re-election Democratic-Republican hold
Arthur Smith (DR) 60.3% John C. Gray (DR) 39.7%
13
Virginia 21
Thomas Newton, Jr.
Democratic-Republican
1797
Re-elected
Thomas Newton, Jr. (DR) 94.7% Others 5.3%
14
Virginia 22
Hugh Nelson
Democratic-Republican
1811
Re-elected
Hugh Nelson (DR) 100%

Questions and formulas:
Question: What ended up happening in the district Virginia 22?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,A1="Virginia 22"),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F14,A2:A14="Virginia 22"),5))
Level: medium
Question: What party won the Virginia 4 district?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,A1="Virginia 4"),3))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F14,A2:A14="Virginia 4"),3))
Level: medium
Question: How many people won the election in the district of Virginia 4?
Formula: ROWS(UNIQUE(FILTER(E1, A1="Virginia 4")))
Formula2: ROWS(UNIQUE(FILTER(E2:E14, A2:A14="Virginia 4")))
Level: medium
Question: Who is the incumbent in the Virginia 6 district?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,A1="Virginia 6"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F14,A2:A14="Virginia 6"),2))
Level: medium