SUMIF Positive, then Negative numbers at each Group change

JLopez123

New Member
Joined
Nov 12, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello all

Racking my brain trying to create an Excel formula that gets the outputs on the two right columns.

I want column C to only SUM the positive numbers within each Group under Column A, otherwise populate a $0 if it runs into a negative value. Then column D would be the inverse - SUM all Negatives within each Group, but then populate a $0 if it finds a positive value. My actual spreadsheet will be 10's of thousands of rows that will change values for every data pull, so I would prefer to have a formula that can populate this easily!

I should note that my column B dollar values will always be sorted from largest to smallest within each Group prior to this calculation.

Capture1.JPG


Thanks for the help.
 

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.
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(B2<0,0,SUMIFS(B:B,B:B,">0",A:A,A2))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,174
Members
449,071
Latest member
cdnMech

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