Table:
0
A
B
C
D
E
1
Race
Candidate
Party
Notes
Votes
2
U.S. Senate
Jeff Merkley
Cross-nominated Democratic
Defeated incumbent Gordon Smith
864,392
3
Oregon State Treasurer
Ben Westlund
Cross-nominated Democratic
Defeated Allen Alley
847,590
4
U.S. House of Representatives, CD1
Joel Haugen
Independent Republican
Lost to incumbent David Wu
58,279
5
State Representative, HD4
Keith Wangle
Independent
Lost to incumbent Dennis Richardson
8,053
6
State Representative, HD5
Pete Belcastro
Independent
Lost to incumbent Peter Buckley
11,653
7
State Representative, HD18
Jim Gilbert
Cross-nominated Democratic
Lost to incumbent Vic Gilliam
11,702
8
State Representative, HD20
Vicki Berger
Cross-nominated Republican
Defeated Richard Riggs
15,829
9
State Representative, HD29
Terry Rilling
Independent
Lost to incumbent Chuck Riley
7,321

Questions and formulas:
Question: How many votes were cast when the notes reported lost to incumbent vic gilliam?
Formula: SUMIFS(E1,D1,"lost to incumbent vic gilliam")
Formula2: SUMIFS(E2:E9,D2:D9,"lost to incumbent vic gilliam")
Level: easy
Question: Who is the candidate in Race for State representative, hd18?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,A1="state representative, hd18"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,A2:A9="state representative, hd18"),2))
Level: medium