using If fuction with vlookup from list

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

I’m working with a list in one worksheet and I have the table list in another
worksheet.
I want to return a value from the table based on the list selection. I have
written this formula. =IF(D5="","",VLOOKUP(D5,Table!A:B,2,FALSE)) and it
returns data from B that match A. Now in another cell I want to return data
from C and when I change B to C it still return data from B not C. How can I
get data from C that matches data from my list?
Thanks for the help.
 
You must change the column index number from 2 to 3

=IF(D5="","",VLOOKUP(D5,Table!A:C,3,FALSE))


Gord Dibben MS Excel MVP
 
Thanks so much this work just fine

Gord Dibben said:
You must change the column index number from 2 to 3

=IF(D5="","",VLOOKUP(D5,Table!A:C,3,FALSE))


Gord Dibben MS Excel MVP
 
Back
Top