count unique transactions

erniepoe

Active Member
Joined
Oct 23, 2006
Messages
375
Office Version
  1. 365
Platform
  1. Windows
hi all,

I want to count the unique numbers in column B given each user ID number in column I. For the first User ID (22), I have the following CSE formula.

any idea what i am doing wrong? Thanks!

If(i2=22,sum(1/countif(B2:B5000,B2:b5000)))
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Try the following formula, which needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER...

Code:
=SUM(IF(FREQUENCY(IF($I$2:$I$5000=22,IF(LEN($B$2:$B$5000)>0,MATCH($B$2:$B$5000,$B$2:$B$5000,0))),ROW($B$2:$B$5000)-ROW($B$2)+1)>0,1))

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,684
Members
449,116
Latest member
HypnoFant

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