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)
Retired Jacksonian hold
Robert W. Barnwell (J)
4
South Carolina 3
Thomas R. Mitchell
Jacksonian
1820 1824
Lost re-election Jacksonian hold
John Campbell (J) Thomas R. Mitchell (J)
5
South Carolina 4
William D. Martin
Jacksonian
1826
Re-elected
William D. Martin (J)
6
South Carolina 5
George McDuffie
Jacksonian
1820
Re-elected
George McDuffie (J)
7
South Carolina 6
Warren R. Davis
Jacksonian
1826
Re-elected
Warren R. Davis (J) 76.1% Cobb 23.9%
8
South Carolina 7
William T. Nuckolls
Jacksonian
1826
Re-elected
William T. Nuckolls (J)

Questions and formulas:
Question: how many "Party" are in district south carolina 2?
Formula: ROWS(UNIQUE(FILTER(C1, A1="South Carolina 2")))
Formula2: ROWS(UNIQUE(FILTER(C2:C8, A2:A8="South Carolina 2")))
Level: medium
Question: What "party" was re-elected in district South Carolina 7?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,(E1="Re-elected")*(A1="South Carolina 7")),3))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,(E2:E8="Re-elected")*(A2:A8="South Carolina 7")),3))
Level: medium
Question: who were the "candidate" of South Carolina 6?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,A1="South Carolina 6"),6))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,A2:A8="South Carolina 6"),6))
Level: medium
Question: Who was the "incumbent" of district south carolina 7?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,A1="South Carolina 7"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,A2:A8="South Carolina 7"),2))
Level: medium