Unique count

vmjan02

Well-known Member
Joined
Aug 15, 2012
Messages
1,062
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
I have this table what is required if the column Apr'23 cell is blank then no action but if has value then it to do a unique client count for column Actual Client Name output in column A.

Is their is a way as i tried a to but no desired result.

C count - Desired (Actual Client Name as Ref)Actual Client NameApr'23
1​
Bank of Maharashtra0
2​
Bank of Maharashtra1
1​
DIPG (Goa)1
1​
Nudge AWC FOUNDATION1
2​
Nudge AWC FOUNDATION1
1​
Adani Estate Management1
1​
ECGC1
1​
Sanofi1
1​
Symbiosis Inst of Law Management1
1​
APV- Citadel1
1​
Directorate of information (G-20/Gujarat)1
Nucleus Office Parks
3​
Bank of Maharashtra2
1​
Dezerv2
2​
Dezerv2
ABC MF
Adani Estate Management
Aegon Life Insurance
AMFI
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Assuming client names are in B

VBA Code:
=IF(C2=0,1,COUNTIF($B$2:$B$20,B2))
 
Upvote 0
This seems more like a running count than a unique count? If so, then try:

Book1
ABC
1C count - Desired (Actual Client Name as Ref)Actual Client NameApr'23
21Bank of Maharashtra0
32Bank of Maharashtra1
41DIPG (Goa)1
51Nudge AWC FOUNDATION1
62Nudge AWC FOUNDATION1
71Adani Estate Management1
81ECGC1
91Sanofi1
101Symbiosis Inst of Law Management1
111APV- Citadel1
121Directorate of information (G-20/Gujarat)1
13 Nucleus Office Parks
143Bank of Maharashtra2
151Dezerv2
162Dezerv2
17 ABC MF
18 Adani Estate Management
19 Aegon Life Insurance
20 AMFI
Sheet1
Cell Formulas
RangeFormula
A2:A20A2=IF(C2<>"",COUNTIF(B$2:B2,B2),"")
 
Upvote 0
Try in A21

VBA Code:
=SUMPRODUCT(1/COUNTIFS(B2:B20,B2:B20,C2:C20,"<>"""))
 
Upvote 0
=IF(C2<>"",COUNTIF(B$2:B2,B2),"")
here is not working

Uniq CC
RO IN
Actual Cleint NameApr'23
CG Govt
CG Govt
CG Govt
5 (this should be 1)CG Govt4
5 (this should be 2)CG Govt4
 
Upvote 0
How about
Excel Formula:
=IF(C2<>"",COUNTIF(B$2:B2,B2,C$2:C2,"<>"),"")
 
Upvote 0
You're right, it should be countifs
 
Upvote 0

Forum statistics

Threads
1,215,636
Messages
6,125,961
Members
449,276
Latest member
surendra75

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