Sometimes one column isn't enough to find the row: "Latte" appears three times, once per size. You need product and size.
Three ways work in Sheets:
- FILTER with two conditions returns the matching price:
=FILTER(D2:D12, A2:A12=F2, B2:B12=G2). If several rows match, it returns them all.
- XLOOKUP on joined keys: join the two keys and the two columns with &,
=XLOOKUP(F2&G2, A2:A12&B2:B12, D2:D12). It returns the first match only, and accepts a not-found value.
- SUMIFS for numbers, when each pair appears once:
=SUMIFS(D2:D12, A2:A12, F2, B2:B12, G2). Careful: a missing pair gives 0, not an error.
Joining keys has one trap: "Cold"&"brew" and "Cold b"&"rew" both make "Coldbrew". With real data that clash is rare; add a separator such as "|" if your keys could collide.