Table:
0
A
B
C
D
E
1
Rank order
Rank
Name
Date
Active service
2
13
Admiral
David G. Farragut
25 July 1866
War of 1812 , Mexican War , and American Civil War
3
14
General of the Army
Ulysses S. Grant
25 July 1866
Mexican War and American Civil War
4
15
General of the Army
William T. Sherman
4 March 1869
Mexican War , American Civil War , and Indian Wars
5
16
Admiral
David D. Porter
17 October 1870
Mexican War and American Civil War
6
17
General of the Army
Philip H. Sheridan
1 June 1888
American Civil War and Indian Wars

Questions and formulas:
Question: What rank does the person participating in American Civil war and indian wars?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,E1="american civil war and indian wars"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E6,E2:E6="american civil war and indian wars"),2))
Level: medium