Share via

Excel group by question

Anonymous
2025-03-11T16:41:06+00:00

Can these formulas be combined?

=GROUPBY(C:C,I:I,SUM,3,1,-2) Product and cost

=GROUPBY(C:C,D:D,SUM,3,1,-2) Product and number of scrapped pieces

Microsoft 365 and Office | Excel | For business | Other

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2025-03-12T12:16:13+00:00

    Trying to determine the top 5 defective parts scrapped (weekly, daily, monthly) that are costing the most money based on column C, the OP Reason (Operation reason).

    Column B = Item Number

    Column C = Defect caused by

    Column F = Total Number of scrapped pieces

    Column I = Total cost of pieces scrapped

    Was this answer helpful?

    0 comments No comments
  2. Ashish Mathur 102K Reputation points Volunteer Moderator
    2025-03-11T23:10:00+00:00

    Hi,

    Try this

    =GROUPBY(C:C,hstack(I:I,D:D),SUM,3,1,-2)

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2025-03-11T20:19:30+00:00

    ... that wouldn't work...

    Yes, you can combine them.

    ( easy numbers to verify the two sum's )

    Was this answer helpful?

    0 comments No comments
  4. HansV 462.6K Reputation points
    2025-03-11T18:58:37+00:00

    Since the groupings would most likely be different, that wouldn't work.

    I'd create a pivot table instead, or use PIVOTBY

    Was this answer helpful?

    0 comments No comments