ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Function (https://www.excelbanter.com/excel-discussion-misc-queries/51631-function.html)

Javster095

Function
 
If my result is a negative number, how can I setup the function to display a
zero as suppose to a negative number. Example, if 2- 3= -1, but I would
rather have my cell to display a zero as suppose to a negative number?

Thanks.


Roger Govier

Function
 
Hi

Something like
=IF(A1-B1<0,0,A1-B1)
or
=MAX(0,A1-B1)

Regards

Roger Govier


Javster095 wrote:
If my result is a negative number, how can I setup the function to display a
zero as suppose to a negative number. Example, if 2- 3= -1, but I would
rather have my cell to display a zero as suppose to a negative number?

Thanks.


Elkar

Function
 
=MAX(2-3,0)

Replace 2-3 with your original function.


"Javster095" wrote:

If my result is a negative number, how can I setup the function to display a
zero as suppose to a negative number. Example, if 2- 3= -1, but I would
rather have my cell to display a zero as suppose to a negative number?

Thanks.


Bob Umlas

Function
 
to DISPLAY 0 (but calc as -1), use Format/Cells, select Custom, and enter:
General;"0"
To CALCULATE as 0, change the formula to be =MAX(0,yourcurrentformula)
"Javster095" wrote in message
...
If my result is a negative number, how can I setup the function to display

a
zero as suppose to a negative number. Example, if 2- 3= -1, but I would
rather have my cell to display a zero as suppose to a negative number?

Thanks.





All times are GMT +1. The time now is 12:35 PM.

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