Table:
0
A
B
C
D
E
1
Name
Date of birth
Actual rank
Appointment date
Allegiance
2
John Garland
1792
Colonel 8th U.S. Infantry
May 7, 1849
U.S.A.
3
William S. Harney
August 27, 1800
Brigadier General
June 14, 1858
U.S.A.
4
Albert S. Johnston
February 2, 1803
Colonel
May 1855
C.S.A.
5
Winfield Scott
June 13, 1786
Major General
June 25, 1841
U.S.A
6
Edwin V. Sumner
January 30, 1797
Brigadier General
March 16, 1861
U.S.A.
7
David E. Twiggs
1790
Brigadier General
June 30, 1846
C.S.A.
8
John E. Wool
February 29, 1784
Brigadier General
June 25, 1841
U.S.A.

Questions and formulas:
Question: Who did Winfield Scott have an allegiance with?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,A1="winfield scott"),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E8,A2:A8="winfield scott"),5))
Level: medium