no decimals

B

BorisS

I have two cells that add up to a third. I need to validate or do something,
which limits the first two cells' inputs, to where the sum of the two does
not equal a decimal. The order in which the two cells will be input is not
certain, and so the "validation" must be on both input cells.

So what I need is what to apply, and to what cells. I'd like to avoid VB if
possible, so am hoping there's a way to do this with validation.

Thx.
 
B

Biff

That's going to be tuff to do because of the input order being random. I
assume an entry of 10.5 in one cell and 10.5 in the other is OK since the
total is an interger? The "easy" way would be to use a formula in the sum
cell that pops a message if the sum is not a whole number and tells the user
to "adjust" the inputs:

Assume the input cells are A1 and A2.

=IF(COUNT(A1:A2)<2,"",IF(MOD(SUM(A1:A2),1)>0,"Invalid Sum, Re-enter
data",SUM(A1:A2)))

Biff
 
Top