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

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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