Table:
0
A
B
C
D
E
1
District
Incumbent
Party
Elected
Status
2
California 1
John All Barham
Republican
1894
Re-elected
3
California 2
Marion De Vries
Democratic
1896
Re-elected
4
California 3
Samuel G. Hilborn
Republican
1894
Defeated in primary Republican hold
5
California 4
James G. Maguire
Democratic
1892
Ran for governor Republican gain
6
California 5
Eugene F. Loud
Republican
1890
Re-elected
7
California 6
Charles A. Barlow
Populist
1900
Lost re-election Republican gain
8
California 7
Curtis H. Castle
Populist
1896
Lost re-election Republican gain

Questions and formulas:
Question: Who is the democratic incumbent that was re-elected?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,(E1="re-elected")*(C1="democratic")),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E8,(E2:E8="re-elected")*(C2:C8="democratic")),2))
Level: medium
Question: What year was republican, re-elected incumbent John all barham elected?
Formula: SUM(FILTER(D1, (C1="republican")*(E1="re-elected")*(B1="john all barham")))
Formula2: SUM(FILTER(D2:D8, (C2:C8="republican")*(E2:E8="re-elected")*(B2:B8="john all barham")))
Level: easy