Error Message for Data Validation

jrandol

New Member
Joined
Feb 16, 2004
Messages
22
I have two validation criteria in a cell (B18) that say:

H17 must be filled before B18 can be filled
and B18 has a text length limit of 45

The code looks like this: =AND(LEN(H17)<>0,LEN(B18)<46)


What I am needing to know is if I can have a different "error message" pop up for each criteria. I would like to have a message pop up if cell H17 isn't filled and if their entry into B18 is more than 45 characters.

If this is possible, I appreciate the help!
JR
 

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
That formula should be:

=(H17 <> "")*(B18 <> "")*(LEN(B18) < 46)

I don't think data validation allows for separate messages...
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
you'll only get one error message for any criteria selected being met.

you could always try to do something in vba though, not my suit though.
 

jrandol

New Member
Joined
Feb 16, 2004
Messages
22
Thanks for the info! I figured that I wouldn't be able to have seperate messages, but thought I would ask. I also don't want to get into the VBA.

Thanks!
JR
 

Watch MrExcel Video

Forum statistics

Threads
1,122,499
Messages
5,596,515
Members
414,074
Latest member
Matthew Kakde

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