ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding Negative and Positive Numbers (https://www.excelbanter.com/excel-discussion-misc-queries/168407-adding-negative-positive-numbers.html)

Jacq

Adding Negative and Positive Numbers
 
Quick question:

If I have the following numbers in a row:

5, 15, 10, -15, -22, 4, 10, -15

Is there a formula I can use for excel to only add up the negative numbers
and ignore the positives?
And is there a formula I can use to only add up the positve numbers and
ignore the negatives?

Thanks


JE McGimpsey

Adding Negative and Positive Numbers
 
One way:

=SUMIF(A1:H1,"<0")

In article ,
Jacq wrote:

Quick question:

If I have the following numbers in a row:

5, 15, 10, -15, -22, 4, 10, -15

Is there a formula I can use for excel to only add up the negative numbers
and ignore the positives?
And is there a formula I can use to only add up the positve numbers and
ignore the negatives?

Thanks


T. Valko

Adding Negative and Positive Numbers
 
Try these:

Negative numbers:

=SUMIF(A1:H1,"<0")

Positive numbers:

=SUMIF(A1:H1,"0")

--
Biff
Microsoft Excel MVP


"Jacq" wrote in message
...
Quick question:

If I have the following numbers in a row:

5, 15, 10, -15, -22, 4, 10, -15

Is there a formula I can use for excel to only add up the negative numbers
and ignore the positives?
And is there a formula I can use to only add up the positve numbers and
ignore the negatives?

Thanks




Gary''s Student

Adding Negative and Positive Numbers
 
=SUM(IF((A1:H1)0,A1:H1)) for positives
=SUM(IF((A1:H1)<0,A1:H1)) for negatives

These are array formulas entered with CNTRL-SHFT-ENTER rather than just ENTER
--
Gary''s Student - gsnu200759


"Jacq" wrote:

Quick question:

If I have the following numbers in a row:

5, 15, 10, -15, -22, 4, 10, -15

Is there a formula I can use for excel to only add up the negative numbers
and ignore the positives?
And is there a formula I can use to only add up the positve numbers and
ignore the negatives?

Thanks


Jacq

Adding Negative and Positive Numbers
 
Thank you all, it worked!!!!!!!!!!


All times are GMT +1. The time now is 02:50 PM.

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