Display a message box when validation criteria is violated

Nitehawkhp

New Member
Joined
Dec 2, 2016
Messages
37
I’m trying to use a msgbox to provide instructions if validation criteria are violated. I’m able to get the validation configured, but I would like a different message box to appear when the entered data is outside the validation criteria.

For example, the validation criteria require the entered numbers must be >0 and <
<entered amount="" <100.="" if="" there="" is="" an="" entry="" <0="" or="">100. If the entry is outside the criteria the default msgbox is displayed stating “This value doesn’t match the data validation restrictions defined for this cell.”

I would like to provide additional information stating that the entry must be
<entered amount="" <100.
0 < entered amount < 100.
I don’t know how to do that type of thing.

Any help would be greatly appreciated.

Rod
</entered></entered>
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Simply click on the "Error Alert" tab in the DV & enter your message in the "Error message" box
 
Upvote 0
When you configure the data validation, you will see a tab that says "Error Alert" . Type your message in the "Error message" box.
 
Upvote 0
Thanks! That's almost too easy.

However, I just discovered an error in my validation formula...

How do I set it up so it will check for greater than 0 and less than 100 for valid entry?
 
Upvote 0
What range of cells has data validation?
 
Upvote 0
Did you change the cell reference? =AND(J1>0, J1<100)
It worked for me.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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