ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Ignoring Negative Values (https://www.excelbanter.com/excel-discussion-misc-queries/31376-ignoring-negative-values.html)

solomon_monkey

Ignoring Negative Values
 
Like all things in Excel there must be a way...

Given a column of numbers (say for simplicity 5 numbers) how can you
use a formula to sum them and ignore any that are negative? (e.g. four
of our 5 numbers are 5 and the other is -5 I want my formula to display
20 and not 15 or 25).

Thanks.


Bill Kuunders

=SUMIF(A1:A5,"0")

Greetings from New Zealand
Bill K

"solomon_monkey" wrote in message
ups.com...
Like all things in Excel there must be a way...

Given a column of numbers (say for simplicity 5 numbers) how can you
use a formula to sum them and ignore any that are negative? (e.g. four
of our 5 numbers are 5 and the other is -5 I want my formula to display
20 and not 15 or 25).

Thanks.




dominicb


Good morning Solomon_monkey

You can do it, using the SUMIF function, and basically just add numbers
that are greater than zero, thus:

=SUMIF(A1:A10,"0",A1:A10)

Your post didn't specify what range you were working on so my example
uses the range A1:A10.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=380295


solomon_monkey

You are all wonderful. Thanks.

And to Bill K I look forward to visiting Middle Earth at some point.
Apparently they still haven't taken down the scenery!!



All times are GMT +1. The time now is 10:45 AM.

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