![]() |
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 |
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 |
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 |
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 |
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