ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Prevent formula calculation from overriding validation (https://www.excelbanter.com/excel-worksheet-functions/255011-prevent-formula-calculation-overriding-validation.html)

CindyMc

Prevent formula calculation from overriding validation
 
I have a list of 4 numbers with a sum at the bottom. One of the 4 numbers is
a calculation, the others are direct entry. The calculated number cannot be
less than zero. How do I fix this so it doesn't allow this when the number
is calculated?

T. Valko

Prevent formula calculation from overriding validation
 
The calculated number cannot be less than zero.

You should have posted the formula.

Try changing your current formula to something like this:

=MAX(0,your_current_formula_here)

--
Biff
Microsoft Excel MVP


"CindyMc" wrote in message
...
I have a list of 4 numbers with a sum at the bottom. One of the 4 numbers
is
a calculation, the others are direct entry. The calculated number cannot
be
less than zero. How do I fix this so it doesn't allow this when the
number
is calculated?




Luke M

Prevent formula calculation from overriding validation
 
Select the three cells that create the sum. (I'll assume B1:B3). Under Data -
Validation, choose custom rule. Input the following:
=SUM($B$1:$B$3)=0

Note that if a user simply selects a cell however and presses "delete" a
negative sum is still possible.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"CindyMc" wrote:

I have a list of 4 numbers with a sum at the bottom. One of the 4 numbers is
a calculation, the others are direct entry. The calculated number cannot be
less than zero. How do I fix this so it doesn't allow this when the number
is calculated?



All times are GMT +1. The time now is 11:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com