ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   display negative numbers as zero (https://www.excelbanter.com/excel-discussion-misc-queries/119670-display-negative-numbers-zero.html)

Andrea

display negative numbers as zero
 
can i display a negative number as a zero?

thus if my formula reads: if(a4a5, a2, a4-a2) but a4-a2 cannot equal a
negative number? lowest it can be is zero. this formula appears on multiple
workbooks, thus it cannot just be if(a4a5, a2,0).

thnaks.

--
Andrea

Dave Peterson

display negative numbers as zero
 
maybe...

=if(a4a5, a2, max(0,a4-a2))



Andrea wrote:

can i display a negative number as a zero?

thus if my formula reads: if(a4a5, a2, a4-a2) but a4-a2 cannot equal a
negative number? lowest it can be is zero. this formula appears on multiple
workbooks, thus it cannot just be if(a4a5, a2,0).

thnaks.

--
Andrea


--

Dave Peterson

Niek Otten

display negative numbers as zero
 
Hi Andrea,

I don't understand the text of you question, but I do understand the heading: "display negative values as zero".
Format |Cells|Number tab|Custom, in the Type box, enter: 0;"0"

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


"Andrea" wrote in message ...
| can i display a negative number as a zero?
|
| thus if my formula reads: if(a4a5, a2, a4-a2) but a4-a2 cannot equal a
| negative number? lowest it can be is zero. this formula appears on multiple
| workbooks, thus it cannot just be if(a4a5, a2,0).
|
| thnaks.
|
| --
| Andrea



PapaDos

display negative numbers as zero
 
if(a4a5, a2, max(0, a4-a2))
--
Regards,
Luc.

"Festina Lente"


"Andrea" wrote:

can i display a negative number as a zero?

thus if my formula reads: if(a4a5, a2, a4-a2) but a4-a2 cannot equal a
negative number? lowest it can be is zero. this formula appears on multiple
workbooks, thus it cannot just be if(a4a5, a2,0).

thnaks.

--
Andrea



All times are GMT +1. The time now is 06:50 AM.

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