Validation

dfenton21

Board Regular
Joined
Jun 23, 2007
Messages
135
Hi All,

Is there anyway to use data validation on cells that contain formula (even through VB).

I have two cells - if the second cell is greater than 0, the first cell should not be less than 14. These two cells contain count formulas. I still want the user to be able to change it, but I would like a message displayed.

Can that be done.

Thanks
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
"Message to be displayed" is a little vague. If the values are changing via formula, then they're changing on their own, yes? In that case the quickest "message" would be in the formula itself.

You could make your formula smart enough to check it's own value, and if it doesn't meet some criteria, display a message instead.

=IF(A1+B1>C1,"Too high",A1+B1)

Also, or instead of, you could use Conditional Formatting to cause the cells to change color to draw attention to themselves when the values are undesirable.

Beyond this, of course, is a multitude of macros and worksheet event code that could do stuff, but that may be more plumbing than you're interested in maintaining.
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,393
Members
449,081
Latest member
JAMES KECULAH

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