make a negative number zero

D

Decopk

I'm trying to make a worksheet and I need any number over 60 to be equal to
60. Or how can I make any negative number a zero? Please help, I've tried
everything!!!
 
T

Thomas Refsdal

Decopk said:
I'm trying to make a worksheet and I need any number over 60 to be equal to
60. Or how can I make any negative number a zero? Please help, I've tried
everything!!!

Have your number in a1 and this formula i b1:

=if(a1>60;60;if(a1<0;0;a1)

You might need to use "," instead of the ";". ";" is the standard delimiter
with Norwegian regional settings.


Rgds

Thomas
 
B

Bob Phillips

Are they just number constants, or the result of a formula. If the latter,
use something like

=IF(formula<0,0,formula) or = MAX(0,formula)

and

=IF(formula>60,60,formula) or =MIN(60,formula)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
W

William Horton

If your data is computed via formulas you could add logic to your formulas
EX. IF(A1+B1<0,0,A1+B1) etc.....
If your data is hard coded EX. 1, 5, -3, etc.... I think you would have to
pick another area and/or worksheet and add formulas to it EX. IF(hardcoded
data <0,0,hardcoded data) etc...

Hope this helps.

Thanks,
Bill Horton
 
C

CLR

You can't just "change a number from what it is to something else", unless
you run a macro after entering the numbers..........if what you are wanting
to do is tailor the results of a formula, then

=IF(SUM(A1:A3)<0,0,MIN(SUM(A1:A3),60))

Replace SUM(A1:A3) with the formula you are using..........

Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top