Sum Negative & Positives with Conditions

Mgmy04

New Member
Joined
Jun 6, 2012
Messages
25
Hello. I need help summing up the negatives and postive numbers on a separate summary sheet and hope someone can help me. I have three columns:

ColmnAColumn BColumn C
8015055
8015052
5024846
8015046
8015048

<tbody>
</tbody>



On my summary page, I am looking for is a formula that will subtract coulmn B from Column C for all 801's (Column A) and then take all those negatives and total them up. In this example, on my summary page I should see a value of -7 on my summary page. I am also looking to the same for the postive numbers. I should see a value of 6 on my summary page.

Any help would be greatly appreciated.

Thank you in advance for your help.
 
Last edited:

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Apply using ctrl-shift-enter

Negatives:
Code:
=SUM(--(IF(A2:A7=801,IF((B2:B7-C2:C7) < 0,B2:B7-C2:C7,0))))

Positives:
Code:
=SUM(--(IF(A2:A7=801,IF((B2:B7-C2:C7) > 0,B2:B7-C2:C7,0))))
 
Upvote 0
Or, without CTRL-SHIFT-ENTER

Negatives: =SUMPRODUCT(--(A2:A6=801),--(B2:B6-C2:C6<0),B2:B6-C2:C6)
Positives: =SUMPRODUCT(--(A2:A6=801),--(B2:B6-C2:C6>0),B2:B6-C2:C6)
 
Upvote 0

Forum statistics

Threads
1,216,025
Messages
6,128,348
Members
449,443
Latest member
Chrissy_M

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top