I agree with vasek1, adding extra columns will simplify the required formulas, but if you want to avoid extra columns, [relatively] simple methods are available.
Method 1 - perform the same concatenation as vasek1 .... but within the limits of the formula, for example. at E2 Home
=INDEX(Ref!D$2:D$100,MATCH(B2&"-"&C2&"-"&D2,Ref!A$2:A$100&"-"&Ref!B$2:B$100&"-"&Ref!C$2:C$100,0))
Formula
must be confirmed with CTRL + SHIFT + ENTER
Method 2 - version without array with LOOKUP
=LOOKUP(2,1/(Ref!A$2:A$100=B2)/(Ref!B$2:B$100=C2)/(Ref!C$2:C$100=D2),Ref!D$2:D$100)
Note that the first formula matches first , the last one last . I assume that in the reference data there will be only one copy of each combination of regions / countries / cities, in which case they will give the same results, but this is not guaranteed in every situation.
So that C2 is "<>" , which means "any country" (according to the comment), you can use this revised version of the LOOKUP formula
=LOOKUP(2,1/(Ref!A$2:A$100=B2)/((Ref!B$2:B$100=C2)+(C2="<>"))/(Ref!C$2:C$100=D2),Ref!D$2:D$100)
A similar change can be applied to the INDEX / MATCH version.
source share