mapping question

Occasional Contributor

Hi all, I'm trying to calculated in column C here how many unique customer ids a payment id is linked to. For example payment id 1 is linked to 1c, 1f and 1g so I want the value to be 3. For payment id 2, it is linked to only 1g so the value should be 1. How would I build a formula for this? Thanks for the help!

Screen Shot 2022-04-15 at 2.35.12 PM.png

1 Reply

@j10999 

In C2:

=COUNTA(UNIQUE(FILTER($A$2:$A$31,$B$2:$B$31=B2,"")))

Adjust the ranges to match your data, then fill down.