Search code examples
google-sheetsgoogle-sheets-formulaformula

How to Make Array Formula To Lookup Matching Values


As you'll see in my sample sheet, I've already found the match between two columns (C and D) and put the results in E. So these values correspond to a value from C, but are in a different order.

Now I want the values from column A, but I need for the formula to match E's value to the correct row in column C first to get the correct corresponding subject in column A.

LMK if my description needs improvement, I just rewrote it about 3 times.


Solution

  • I think this does what you want. There's no index function for array so you have to reconstruct a vlookup.

    =filter(If(E2:E="","",vlookup(E2:E,{C:C,A:A},2,false)),not(isblank(A2:A)))