insert a "message" in VLOOKUP

Akashwani

Well-known Member
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

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
=if(iserror(VLOOKUP(B5,Master,2,0)),"Error - No data",VLOOKUP(B5,Master,2,0))

Try

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

Thank you very much, works a treat.

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

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,

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)

Colouring and flashing text in the result of a formula is not possible, sorry.

Ok, thanks anyway.

Ak

Actually I wasn't quite correct. You can't flash cells without VBA code but you could colour a cell if it contained a particular value (like your message) using Conditional Formatting http://www.contextures.com/xlCondFormat01.html

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.

Replies
7
Views
285
Replies
5
Views
641
Replies
9
Views
181
Replies
1
Views
234
Replies
4
Views
344

1,221,153
Messages
6,158,233
Members
451,477
Latest member
CWebbers

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.

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

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