Forum Discussion

8932LDG's avatar
8932LDG
Copper Contributor
Jun 11, 2023
Solved

How to combine if statement with VLOOKUP formula

I have a table (please see the sample below), and I need to fill two columns ('Manager's name' and 'Manager's email') based on the column 'report to'. The value in 'Report to' indicates the 'employee...
  • HansVogelaar's avatar
    Jun 11, 2023

    8932LDG 

    In G2:

    =IF(F2="","",VLOOKUP(IF(VLOOKUP(F2,$A$2:$F$14,4,FALSE)=0,VLOOKUP(F2,$A$2:$F$14,6,FALSE),F2),$A$2:$F$14,3,FALSE))

    In H2:

    =IF(F2="","",VLOOKUP(IF(VLOOKUP(F2,$A$2:$F$14,4,FALSE)=0,VLOOKUP(F2,$A$2:$F$14,6,FALSE),F2),$A$2:$F$14,2,FALSE))

    Fill down.

Resources