Table:
0
A
B
C
D
E
1
Team 1
Agg.
Team 2
1st leg
2nd leg
2
Al-Ahly
Vs.
Younan
5–0
3–0
3
Al-Ahly
Vs.
Farouk
2–2
0–1
4
Al-Ahly
Vs.
Tersana
2–2
1–1
5
Al-Ahly
Vs.
Olympic
5–2
2–0
6
Al-Ahly
Vs.
Al-Masry
3–0
3–1
7
Al-Ahly
Vs.
Ittihad
1–2
1–0
8
Al-Ahly
Vs.
Ismaily
2–0
1–2
9
Al-Ahly
Vs.
Al-Sekka Al-Hadid
7–0
4–2
10
Al-Ahly
Vs.
Teram
2–1
2–1
11
Al-Ahly
Vs.
Port Fouad
2–1
2–0

Questions and formulas:
Question: What is the 2nd leg in match with team 2 of Teram?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,C1="teram"),5))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E11,C2:C11="teram"),5))
Level: medium