Vlookup and If functions

R

Robin Reid

Worksheet 1 and 2 have student ID numbers in column 1 to identify the
records. I am trying to use the ID number to look up information in worksheet
2 and have it placed in a specific cell in worksheet 1. If the ID number is
not contained in worksheet 2 I would like the function to remain blank or to
place the number zero in the cell. If the ID number is located in worksheet 2
then I want the function to return the value in the corresponding column 2.
 
J

Jacob Skaria

Refer help on VLOOKUP..

Try the below formula in Sheet1 with unique id in sheet1 A1...
=VLOOKUP(A1,sheet2!A:B,2,0)

'modified to handle no matches
=IF(ISNA(VLOOKUP(A1,sheet2!A:B,2,0)),"",VLOOKUP(A1,sheet2!A:B,2,0))

If this post helps click Yes
 

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