# Formula to sum up in different columns

1. ## Formula to sum up in different columns

Hi all,

I need to come up with a formula that sums up the total positive numbers for each colour in one column and the total negative numbers for each colour in a separate column. So the Totals in columns C and D should show sums of numbers (positive or negative) between two Totals in column B. I've been struggling with this little issue all morning, so any help would be much appreciated.

Thanks!  Register To Reply

2. ## Re: Formula to sum up in different columns

Welcome to the forum. Like this perhaps:

Excel 2016 (Windows) 32 bit
D
E
1
Required data
2
Total positive Total negative
3
=IF(\$B3>0,\$B3,0)
=IF(\$B3<0,\$B3,0)
 Sheet: Sheet1  Register To Reply

3. ## Re: Formula to sum up in different columns

Thank you! Since there are hundreds of "colours", I need D7 and E7, D14 and E14, etc. to show the totals for the color above. So the formula should include that if A7 is "Total", then I get the total of the positive/negative numbers between B3 and B6, else I get the positive/negative number as you suggested. However, I'm not sure how to indicate in the formula on what cells should be summed up in "Total".  Register To Reply

4. ## Re: Formula to sum up in different columns

OK - provide a more representative set of sample data that shows us what you really want and I'll take another look. I don't do guessing games - sorry.   Register To Reply

5. ## Re: Formula to sum up in different columns Originally Posted by Deria ...I need D7 and E7, D14 and E14, etc. to show the totals for the color above.
So, based on your sample file / values, something like:

Formula:  `Please Login or Register  to view this content.`  Register To Reply

6. ## Re: Formula to sum up in different columns

That's exactly what I needed! Thank you!   Register To Reply

7. ## Re: Formula to sum up in different columns  Register To Reply