• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Double VLOOKUP? Possible

scooter

New Member
I have attached a file part2.xls
I need a VLOOKUP that if it returns an error I need another VLOOKUP.
I have attached a sample workbook Sheet1 is where my initial VLOOKUP is.
It uses lookup value from Column A to retrieve data from Column B on sheet 2
But when it returns an error or 0 in this case because no data is available in Column B - I then need it to go do the same VLOOKUP on sheet3 and return data from column B.

What do you think - Can you please help with this.
 

Attachments

Try this

=IF(VLOOKUP(A2,Sheet2!A:B,2,FALSE)=0,VLOOKUP(A2,Sheet3!$A$1:$B$13,2,0),VLOOKUP(A2,Sheet2!A:B,2,FALSE))
 

Attachments

It's really not returning error, but 0 for blanks.
You can use IF statement to check for that condition.

If it was true error value, you can use IFERROR.

I prefer Index,Match but also did Vlookup version.

Edit: Try not to use entire column. It will significantly slow down calculation process.
 

Attachments

Try this

=IF(VLOOKUP(A2,Sheet2!A:B,2,FALSE)=0,VLOOKUP(A2,Sheet3!$A$1:$B$13,2,0),VLOOKUP(A2,Sheet2!A:B,2,FALSE))

If Sheet 2 and Sheet 3 result column data both in blank, the above formula will give 0,

then, if you wanted the result give Blank,

try this :

=LOOKUP("zzzz",CHOOSE({1,2,3},"",VLOOKUP(A2,Sheet3!$A$1:$B$13,2,0),VLOOKUP(A2,Sheet2!$A$1:$B$13,2,0)))

Regards
Bosco
 
Back
Top