Table:
0
A
B
C
D
E
1
District
Incumbent
Party
First elected
Results
2
Virginia 1
Jo Ann Davis
Republican
2000
Re-elected
3
Virginia 2
Thelma Drake
Republican
2004
Re-elected
4
Virginia 3
Bobby Scott
Democratic
1992
Re-elected
5
Virginia 4
Randy Forbes
Republican
2001
Re-elected
6
Virginia 5
Virgil Goode
Republican
1996
Re-elected
7
Virginia 6
Bob Goodlatte
Republican
1992
Re-elected
8
Virginia 7
Eric Cantor
Republican
2000
Re-elected
9
Virginia 8
Jim Moran
Democratic
1990
Re-elected
10
Virginia 9
Rick Boucher
Democratic
1982
Re-elected
11
Virginia 10
Frank Wolf
Republican
1980
Re-elected
12
Virginia 11
Tom Davis
Republican
1994
Re-elected

Questions and formulas:
Question: What district is Jim Moran the incumbent for.
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,B1="jim moran"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E12,B2:B12="jim moran"),1))
Level: medium
Question: What was the election result before 2004 where Eric Cantor was the incumbent?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,(D1<2004)*(B1="eric cantor")),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E12,(D2:D12<2004)*(B2:B12="eric cantor")),5))
Level: medium