ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Display "0" for negative numbers (https://www.excelbanter.com/excel-worksheet-functions/183463-display-0-negative-numbers.html)

Bryce

Display "0" for negative numbers
 
How do I write a function that displays "0" when a negative number is the
result of a sum?

David Biddulph[_2_]

Display "0" for negative numbers
 
=MAX(0,SUM(A1:A3))
--
David Biddulph

"Bryce" wrote in message
...
How do I write a function that displays "0" when a negative number is the
result of a sum?




JE McGimpsey

Display "0" for negative numbers
 
One way:

=MAX(0,SUM(A1:A4))

Or, if you just want to display 0, not change the value to 0

Format/Cells/Number/Custom General;\0;General;@


In article ,
Bryce wrote:

How do I write a function that displays "0" when a negative number is the
result of a sum?


Gaurav[_2_]

Display "0" for negative numbers
 
IF(SUM(A1:A10)<0,0,SUM(A1:A10))



"Bryce" wrote in message
...
How do I write a function that displays "0" when a negative number is the
result of a sum?





All times are GMT +1. The time now is 09:55 AM.

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