Table:
0
A
B
C
D
E
1
Team 1
Agg.
Team 2
1st leg
2nd leg
2
Roma
2–6
Shakhtar Donetsk
2–3
0–3
3
Milan
0–1
Tottenham Hotspur
0–1
0–0
4
Valencia
2–4
Schalke 04
1–1
1–3
5
Internazionale
( a )3–3
Bayern Munich
0–1
3–2
6
Lyon
1–4
Real Madrid
1–1
0–3
7
Arsenal
3–4
Barcelona
2–1
1–3
8
Marseille
1–2
Manchester United
0–0
1–2
9
Copenhagen
0–2
Chelsea
0–2
0–0

Questions and formulas:
Question: What is team 1 when team 2 is Manchester United?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,C1="manchester united"),1))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,C2:C9="manchester united"),1))
Level: medium
Question: What is the agg when team 1 is Milan?
Formula: UNIQUE(CHOOSECOLS(FILTER(A1:E1,A1="milan"),2))
Formula2: UNIQUE(CHOOSECOLS(FILTER(A2:E9,A2:A9="milan"),2))
Level: medium