ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Number Format (https://www.excelbanter.com/excel-worksheet-functions/129530-number-format.html)

Terence

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

Thanks for your help!

Dave F

Number Format
 
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
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Terence" wrote:

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

Thanks for your help!


Teethless mama

Number Format
 
=MAX(your formula,0)


"Terence" wrote:

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

Thanks for your help!


Gord Dibben

Number Format
 
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

On Tue, 6 Feb 2007 15:29:00 -0800, Teethless mama
wrote:

=MAX(your formula,0)


"Terence" wrote:

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

Thanks for your help!



Terence

Number Format
 
Thanks Dave, that worked perfect!

"Dave F" wrote:

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
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Terence" wrote:

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

Thanks for your help!



All times are GMT +1. The time now is 01:17 AM.

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