Counting Unique if theres a value in another field

creative999

Board Regular
Joined
Jul 7, 2021
Messages
82
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
I want to count how many unique Sale IDs there are:

a. if there is a value in the Rev Share column.
and separatly,
b. the Sale ID has NO Rev Share

So in the attached example:
a. = 3
b. = 2

Any suggestions:

Book2
AB
1REV SHARESALE ID
2ABCa9e
3a9e
4ABCa9e
5XYZa9e
6a9e
764M
864M
964M
1064M
11VXq
12DEFVXq
13VXq
14DEFVXq
15VXq
16ABC7Qe
17ABC7Qe
187Qe
197Qe
20DEF7Qe
217Qe
22Xp2
23Xp2
24Xp2
25Xp2
26Xp2
Sheet1
 
Try

=SUM(IF(FREQUENCY(IF(A2:A26<>"",IF(C2:C26="YES",MATCH(B2:B26,B2:B26,0))),ROW(B2:B26)-ROW(B2)+1),1))
Ctrl+Shift+Enter

M.
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,214,375
Messages
6,119,164
Members
448,870
Latest member
max_pedreira

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