Table:
0
A
B
C
D
E
F
1
District
Incumbent
Party
First elected
Result
Candidates
2
South Carolina 1
William Drayton
Jacksonian
1825 ( special )
Re-elected
William Drayton (J)
3
South Carolina 2
James Hamilton, Jr.
Jacksonian
1822 (special)
Re-elected
James Hamilton, Jr. (J) 100%
4
South Carolina 5
George McDuffie
Jacksonian
1820
Re-elected
George McDuffie (J)
5
South Carolina 6
John Wilson
Jacksonian
1820
Lost re-election Jacksonian hold
Warren R. Davis (J) 50.3% John Wilson (J) 49.7%
6
South Carolina 8
John Carter
Jacksonian
1822 (special)
Re-elected
John Carter (J) 100%

Questions and formulas:
Question: Who was the incumbent when the candidate was william drayton (j)?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,F1="William Drayton (J)"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F6,F2:F6="William Drayton (J)"),2))
Level: medium
Question: What party did candidate george mcduffie (j) represent?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,F1="George McDuffie (J)"),3))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F6,F2:F6="George McDuffie (J)"),3))
Level: medium