Table:
0
A
B
C
D
E
F
1
Office
Type
Location
Elected
Term began
Term ended
2
Mayor
Executive
San Francisco
N/A
December 4, 1978
January 8, 1980
3
Mayor
Executive
San Francisco
1979
January 8, 1980
January 8, 1984
4
Mayor
Executive
San Francisco
1983
January 8, 1984
January 8, 1988
5
Senator
Legislature
Washington, D.C.
1992
November 4, 1992
January 3, 1995
6
Senator
Legislature
Washington, D.C.
1994
January 3, 1995
January 3, 2001
7
Senator
Legislature
Washington, D.C.
2000
January 3, 2001
January 3, 2007
8
Senator
Legislature
Washington, D.C.
2006
January 3, 2007
January 3, 2013

Questions and formulas:
Question: When did the term end that began January 3, 2007?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,E1="January 3, 2007"),6))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,E2:E8="January 3, 2007"),6))
Level: medium
Question: When did the term began when the date of election is N/A?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,D1="N/A"),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,D2:D8="N/A"),5))
Level: medium
Question: When did the term end that began December 4, 1978?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,E1="December 4, 1978"),6))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,E2:E8="December 4, 1978"),6))
Level: medium
Question: When did the term begin that ended January 3, 1995?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,F1="January 3, 1995"),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,F2:F8="January 3, 1995"),5))
Level: medium
Question: What branch of government was the term that ended on January 3, 2001?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:F1,F1="January 3, 2001"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:F8,F2:F8="January 3, 2001"),2))
Level: medium