Sum only Unique values based on criteria in excel

Anonymous
2023-10-08T05:18:37+00:00

Is there a way only unique values are totalled based on a criteria?

For e.g. in this table, if I want to add only unique values at an "ID" level, it should be 510. But the current output is doubling.

Similarly, if I want to add only unique values at a "Concat" level, then it shoud be 350, but currently it is doubling or tripling based on the data.

Microsoft 365 and Office | Excel | For business | Windows

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
{count} votes
Answer accepted by question author
  1. Anonymous
    2023-10-09T06:46:30+00:00

    It should work.

    1 person found this answer helpful.
    0 comments No comments

8 additional answers

Sort by: Most helpful
  1. Anonymous
    2023-10-08T11:00:51+00:00

    =SUM(CHOOSECOLS(UNIQUE(FILTER($A$4:$G$11,$B$4:$B$11=B4)),6))

    =SUM(CHOOSECOLS(UNIQUE(FILTER($A$4:$G$11,$C$4:$C$11=C4)),6))

    0 comments No comments
  2. Anonymous
    2023-10-09T06:27:28+00:00

    i tried this on a dataset that has columns from A to AY with 6000 rows, with the values to be summed in column AY,

    ID1 in AU, ID2 in AV... and this is the formula applied

    =SUM(CHOOSECOLS(UNIQUE(FILTER($AU$2:$AY$6000,$AV$2:$AV$6000=AV2)),5))

    Sample columns without data and formula applied on the actual dataset...

    0 comments No comments
  3. Anonymous
    2023-10-09T08:48:35+00:00

    it worked! i realized i had an error with the concatenation! thanks a lot..

    0 comments No comments
  4. Anonymous
    2023-10-09T08:55:09+00:00

    You are welcome. You may also give feedback on it. Thank you:)

    0 comments No comments