VLOOKUP - return value from alternate sheet on match and specific text when no match

hbhowser

New Member
Joined
Jun 27, 2017
Messages
4
Hello Everyone!

I've searched and tried a number of variations of functions but am not getting a consistent result.
I'm hoping that there is some excel magic out there and I'm thinking that it's not too difficult but I can't seem to resolve.

The below function searches for the value in A2 in sheet '2016-2017'!A:B and returns the value from B when the name matches.
=VLOOKUP(A2,'2016-2017'!A:B,2,TRUE)

My challenge is when there is no match on the name in A2, I would like to return "Need #" to the primary sheet.

I've tried IFERROR, MATCH, etc and am not getting the syntax correct.

Any/all suggestions would be much appreciated!
Thank you
 
Thank you, thank you!
I've replace my last function with =IF(ISERROR(VLOOKUP(A8,'2016-2017'!A:B,2,FALSE)),"Need#",VLOOKUP(A8,'2016-2017'!A:B,2,FALSE)) ... and it's working.
Again - much appreciated!

=IFERROR(VLOOKUP(A8,'2016-2017'!A:B,2,0),"Need#")

Replace IFERROR with IFNA if you have this on your system.
 
Upvote 0

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,217,476
Messages
6,136,883
Members
450,029
Latest member
MissQuotation

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top