1

I have the following working formula in my header row and that returns an array of "Project Team Owner" values from my Form Responses sheet based on a matching Unique ID:

={"Project Team Owner"; 
   INDEX(IFNA(VLOOKUP(A2:A,'Form Responses'!A2:U,COLUMN('Form Responses'!G2:G),0)))}

The problem I'm having is that the "Project Team Owner" will be in one of (not both) Form Responses Column G or Column H.

How can I modify my formula so it will return the result from Column H if it isn't found in Column G?

Sample Data

Link to example Google spreadsheet

Form Responses

A B - F G H
1 Unique ID Value 1 Value 2
2 PID-1 TCP
3 PID-2 Computing Services

Desired Result (Formula in B1)

A B
1 Unique ID Project Team Owner
2 PID-1 TCP
3 PID-2 Computing Services
0

1 Answer 1

0

BYROW

You can use VLOOKUP to return a two-column array then use JOIN in BYROW to combine them into one.

={"Project Team Owner"; 
  BYROW(
    INDEX(
      IFNA(
        VLOOKUP(A2:A, 'Form Responses'!A2:F, {7,8},))),
    LAMBDA(r, JOIN(,r)))}

BYROW  IFNA  INDEX  JOIN  LAMBDA  VLOOKUP

LET

Create an array inside the VLOOKUP by combining the range with a merged column made from columns G and H

={"Project Team Owner";
  LET(
    rng,'Form Responses'!A2:F,  
    INDEX(
      IFNA(
        VLOOKUP(A2:A, {rng, INDEX(rng,,7) & INDEX(rng,,8)}, 9,))))} 

IFNA  INDEX  LET  VLOOKUP

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.