Table:
0
A
B
C
D
E
F
1
District
Incumbent
Party
First elected
Result
Candidates
2
Pennsylvania 5
Jacob Fry, Jr.
Democratic
1834
Retired Democratic hold
Joseph Fornance (D) 54.9% Joseph Royer (W) 45.1%
3
Pennsylvania 6
Mathias Morris
Whig
1834
Lost re-election Democratic gain
John Davis (D) 51.9% Mathias Morris (W) 48.1%
4
Pennsylvania 9
George Keim
Democratic
1838 ( special )
Re-elected
George Keim (D) 69.3% Daniel M. Bieber (W) 30.7%
5
Pennsylvania 10
Luther Reily
Democratic
1836
Retired Whig gain
William Simonton (W) 59.1% William Reily (D) 40.9%
6
Pennsylvania 11
Henry Logan
Democratic
1834
Retired Democratic hold
James Gerry (D) 56.6% Charles A. Barnitz (W) 43.4%
7
Pennsylvania 12
Daniel Sheffer
Democratic
1836
Lost re-election Whig gain
James Cooper (W) 55.9% Daniel Sheffer (D) 44.1%
8
Pennsylvania 15
David Petrikin
Democratic
1836
Re-elected
David Petrikin (D) 53.5% David Hurley (W) 46.5%
9
Pennsylvania 18
Charles Ogle
Anti-Masonic
1836
Re-elected
Charles Ogle (AM) 55.9% Job Mann (D) 44.1%
10
Pennsylvania 20
Andrew Buchanan
Democratic
1832
Retired Democratic hold
Enos Hook (D) 62.4% Fideleo Hughes (W) 37.6%
11
Pennsylvania 21
Thomas M. T. McKennan
Anti-Masonic
1830
Retired Democratic gain
Isaac Leet (D) 50.1% Joseph Lawrence (W) 49.9%
12
Pennsylvania 22
Richard Biddle
Anti-Masonic
1836
Re-elected
Richard Biddle (AM) 58.1% James Power (D) 41.9%
13
Pennsylvania 23
William Beatty
Democratic
1836
Re-elected
William Beatty (D) 61.5% George W. Smith (W) 38.5%
14
Pennsylvania 24
Thomas Henry
Anti-Masonic
1836
Re-elected
Thomas Henry (AM) 54.7% James D. White (D) 45.3%

Questions and formulas:
Question: Which party does the incumbent Mathias Morris belong to?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,B1="Mathias Morris"),3))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F14,B2:B14="Mathias Morris"),3))
Level: medium
Question: Which district does the incumbent Luther Reily represent?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,B1="Luther Reily"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F14,B2:B14="Luther Reily"),1))
Level: medium
Question: Who are the candidates for the Pennsylvania 11 district?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,A1="Pennsylvania 11"),6))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F14,A2:A14="Pennsylvania 11"),6))
Level: medium
Question: How many people won the election in the Pennsylvania 11 district?
Formula: ROWS(UNIQUE(FILTER(F1, A1="Pennsylvania 11")))
Formula2: ROWS(UNIQUE(FILTER(F2:F14, A2:A14="Pennsylvania 11")))
Level: medium