Table:
0
A
B
C
D
E
F
1
District
Incumbent
Party
First elected
Result
Candidates
2
Virginia 2
James Trezvant
Jacksonian
1825
Re-elected
James Trezvant (J) 100%
3
Virginia 3
William S. Archer
Jacksonian
1820 (special)
Re-elected
William S. Archer (J) 100%
4
Virginia 4
Mark Alexander
Jacksonian
1819
Re-elected
Mark Alexander (J) 100%
5
Virginia 6
Thomas Davenport
Jacksonian
1825
Re-elected
Thomas Davenport (J) 100%
6
Virginia 7
Nathaniel H. Claiborne
Jacksonian
1825
Re-elected
Nathaniel H. Claiborne (J) 100%
7
Virginia 9
Andrew Stevenson
Jacksonian
1821
Re-elected
Andrew Stevenson (J) 100%
8
Virginia 10
William C. Rives
Jacksonian
1823
Re-elected
William C. Rives (J) 100%
9
Virginia 11
Philip P. Barbour
Jacksonian
1815 1827
Re-elected
Philip P. Barbour (J) 100%
10
Virginia 12
John Roane
Jacksonian
1809 1827
Re-elected
John Roane (J) 100%
11
Virginia 13
John Taliaferro
Anti-Jacksonian
1824 (special)
Re-elected
John Taliaferro (AJ) 61.8% Willoughby Newton 38.2%
12
Virginia 14
Charles F. Mercer
Anti-Jacksonian
1817
Re-elected
Charles F. Mercer (AJ) 82.0% John Gibson 18.0%
13
Virginia 15
John S. Barbour
Jacksonian
1823
Re-elected
John S. Barbour (J) 100%
14
Virginia 16
William Armstrong
Anti-Jacksonian
1825
Re-elected
William Armstrong (AJ) 100%
15
Virginia 17
Robert Allen
Jacksonian
1827
Re-elected
Robert Allen (J) 61.5% Samuel Kerceval 38.5%
16
Virginia 19
William McCoy
Jacksonian
1811
Re-elected
William McCoy (J) 100%
17
Virginia 20
John Floyd
Jacksonian
1817
Retired Jacksonian hold
Robert Craig (J) 55.0% Fleming B. Miller 45.0%

Questions and formulas:
Question: How many people were first elected when john roane was the incumbent?
Formula: ROWS(UNIQUE(FILTER(D1, B1="John Roane")))
Formula2: ROWS(UNIQUE(FILTER(D2:D17, B2:B17="John Roane")))
Level: medium
Question: What party did john s. barbour represent?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,B1="John S. Barbour"),3))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F17,B2:B17="John S. Barbour"),3))
Level: medium
Question: What was the result of the election featuring andrew stevenson (j) 100%?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,F1="Andrew Stevenson (J) 100%"),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F17,F2:F17="Andrew Stevenson (J) 100%"),5))
Level: medium
Question: What candidate(s) ran for election when nathaniel h. claiborne was the incumbent?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,B1="Nathaniel H. Claiborne"),6))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F17,B2:B17="Nathaniel H. Claiborne"),6))
Level: medium