Forum Discussion

Deleted's avatar
Deleted
May 24, 2018
Solved

Logical function with Vlookup in a single formula

Hi Everybody,

 

How to use Vlookup along with IF function in a one single formula.

Please help

  • Hello-

     

    Try looking at this example for reference.  It looks at the value in cell C3 and depending on whether it says "Name" or "Address"  the vlookup column reference will change. (See attached .xlsx for additional reference).

     

    =IF(C3="Name",VLOOKUP(C2,$B$7:$D$13,2,FALSE), VLOOKUP(C2,$B$7:$D$13,3,FALSE) )

     

1 Reply

  • Matt Mickle's avatar
    Matt Mickle
    Bronze Contributor

    Hello-

     

    Try looking at this example for reference.  It looks at the value in cell C3 and depending on whether it says "Name" or "Address"  the vlookup column reference will change. (See attached .xlsx for additional reference).

     

    =IF(C3="Name",VLOOKUP(C2,$B$7:$D$13,2,FALSE), VLOOKUP(C2,$B$7:$D$13,3,FALSE) )