VLOOKUP by Combining 2 Columns to Form a Unique Key
You can use an array formula:
=INDEX($C$1:$C$7,MATCH("1foo",$A$1:$A$7 & $B$1:$B$7,0))
just select in example D1
, enter formula in formula bar and press CTRL+SHIFT+ENTER to evaluate it
The way I usually do it is by concatenating the values separated by a pipe character (|). See the formula in the screenshot below.
Then you can vlookup using the concatenated key.
=VLOOKUP("1|foo",$C$1:$D$7,2,FALSE)