using If fuction with vlookup from list

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.
 
G

Gord Dibben

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
 
L

Larry

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top