Not sure what to title - SUMIF but a lot harder?

megera716

Board Regular
Joined
Jan 3, 2013
Messages
146
Office Version
  1. 365
Platform
  1. Windows
Sorry I don't even know what to title this. I had to exclude some of the data for anonymity, but this should be all the info necessary to do what I need.

I have a list of products, some of them are in groups and some are not (I highlighted two groups yellow and blue for ease). If they are in a group, I need to sum the value from the Minimum column of only the Children from Column D, but put it on the Parent line that has the same Group ID from column B. See screenshot below. if Column D is blank (which it is, around row 500 and down), then Column AK should pull the number from Column AJ.

I typed these numbers in by hand for what it should look like, but my data is over 2,000 rows so obviously not a practical solution for the entire sheet.

22730459_10155345134126725_5912847264481928002_n.jpg


Thanks!
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Try this formula in AK2 copied down [revised]

=IF(D2="Child","",IF(D2="Parent",IF(COUNTIF(B:B,B2)>1,SUMIFS(AJ:AJ,B:B,B2,D:D,"Child"),AJ2),AJ2))
 
Last edited:
Upvote 0
Try this formula in AK2 copied down [revised]

=IF(D2="Child","",IF(D2="Parent",IF(COUNTIF(B:B,B2)>1,SUMIFS(AJ:AJ,B:B,B2,D:D,"Child"),AJ2),AJ2))


This got me part of the way there! Your formula returned a 0 on the rows that were a parent with no children (basically all of the rows EXCEPT the yellow and blue ones from my screenshot). I think it's because the second part says If D is a parent (true), then SUMIF with one of the criteria being "Child", but there are no children to sum on those lines. But since the argument returned true, it doesn't look at AJ for a result.
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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