Number Format

T

Terence

Is it possible to format a cell where if the cell value is negative then
change the value to zero?

Thanks for your help!
 
D

Dave F

Are the cell values derived from formulas? Then just set the formula value
to zero if the formula calculation is less than zero: =IF(A1*B1<0,0,A1*B1),
etc.

Dave
 
G

Gord Dibben

Or by using event code which looks at the value in the cell and changes to 0 if
negative.

No formulas involved, just VBA


Gord Dibben MS Excel MVP
 
T

Terence

Thanks Dave, that worked perfect!

Dave F said:
Are the cell values derived from formulas? Then just set the formula value
to zero if the formula calculation is less than zero: =IF(A1*B1<0,0,A1*B1),
etc.

Dave
 
Top