insert a "message" in VLOOKUP

Akashwani

Well-known Member
Joined
Mar 14, 2009
Messages
2,911
Good day to you all,

I have the following =VLOOKUP(B5,Master,2,FALSE)

What I want to know is, can I include a "message" after FALSE?

I want a message to come up if the result is incorrect, rather than have #N/A appear.

Ak
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
L

Legacy 51064

Guest
=if(iserror(VLOOKUP(B5,Master,2,0)),"Error - No data",VLOOKUP(B5,Master,2,0))
 
Upvote 0

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

=IF(ISNA(VLOOKUP(B5,Master,2,FALSE)),"Message",VLOOKUP(B5,Master,2,FALSE))
 
Upvote 0

Akashwani

Well-known Member
Joined
Mar 14, 2009
Messages
2,911
Thank you very much, works a treat. :biggrin:

I spent an hour trying to work this out, :( and I got a reply on here in 5 minutes, EXCELLENT.

I am a total novice and really do struggle to understand Excel and Excel help, any advice on how to improve my (limited) skills?

Thanks

Ak
 
Upvote 0

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Welcome to the Board!

I am a total novice and really do struggle to understand Excel and Excel help, any advice on how to improve my (limited) skills?

Keep plugging away at it. I think you'll find that very few of us have ever taken a class.

I'd recommend looking at the Microsoft Template Gallery and play with templates that you find useful for work/home.

There's also a lot of content at the Microsoft Office Online site.

And you can always ask questions here! That's why the board's here. :)

HTH,
 
Upvote 0

Akashwani

Well-known Member
Joined
Mar 14, 2009
Messages
2,911
Hi, I'm back.

I knew I should have asked this in my original post.

How do I make the "message" show up red?

And can you make the "message" flash???????

Ak (the Boomarang)
 
Upvote 0

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Colouring and flashing text in the result of a formula is not possible, sorry.
 
Upvote 0

gardnertoo

Well-known Member
Joined
Jul 24, 2007
Messages
938
Colouring and flashing text in the result of a formula is not possible, sorry.

However, you can set up conditional formatting in that cell so that if the cell contents match your message, the cell font is red.
 
Upvote 0

Forum statistics

Threads
1,191,717
Messages
5,988,258
Members
440,146
Latest member
rgomes8

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
Top