# 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!

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

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".

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.

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:

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

That's exactly what I needed! Thank you!

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

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1