Modify formula in Column E to exclude recurring customer names in column A.

imran1059

Board Regular
Joined
Sep 28, 2014
Messages
112
Hi Everone,

I have following formula in E2

=COUNTIFS($A$2:$A2,A2,$B$2:$B2,B2,$D$2:$D2,D2,$C$2:$C2,C2)

and its giving me following output. I need to count unique customers in given criteria. Right Most column is my desired output.

[TABLE="width: 677"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Customer Name[/TD]
[TD]Region[/TD]
[TD]Division[/TD]
[TD]Category[/TD]
[TD]Sr. No. of Unique Customers per Region per Division per Category
(Output by Formula)[/TD]
[TD]Sr. No. of Unique Customers per Region per Division per Category
(Desired Output)[/TD]
[/TR]
[TR]
[TD="align: left"]ABC Communication[/TD]
[TD]Central[/TD]
[TD]CND[/TD]
[TD]Private[/TD]
[TD]1.00[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD="align: left"]ABC Communication[/TD]
[TD]Central[/TD]
[TD]CND[/TD]
[TD]Government[/TD]
[TD]1.00[/TD]
[TD]0.50[/TD]
[/TR]
[TR]
[TD="align: left"]ABC Communication[/TD]
[TD]Central[/TD]
[TD]CND[/TD]
[TD]Semi-Government[/TD]
[TD]1.00[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD="align: left"]ABC Communication[/TD]
[TD]Western[/TD]
[TD]CND[/TD]
[TD]Semi-Government[/TD]
[TD]1.00[/TD]
[TD]0.33[/TD]
[/TR]
[TR]
[TD="align: left"]ABC Communication[/TD]
[TD]Western[/TD]
[TD]CND[/TD]
[TD]Semi-Government[/TD]
[TD]2.00[/TD]
[TD]0.33[/TD]
[/TR]
[TR]
[TD="align: left"]ABC Communication[/TD]
[TD]Western[/TD]
[TD]CND[/TD]
[TD]Semi-Government[/TD]
[TD]3.00[/TD]
[TD]0.33[/TD]
[/TR]
[TR]
[TD="align: left"]ABC Communication[/TD]
[TD]Western[/TD]
[TD]END[/TD]
[TD]Semi-Government[/TD]
[TD]1.00[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD="align: left"]ABC Communication[/TD]
[TD]Western[/TD]
[TD]CND[/TD]
[TD]Government[/TD]
[TD]1.00[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD="align: left"]ABC Communication[/TD]
[TD]Central[/TD]
[TD]CND[/TD]
[TD]Government[/TD]
[TD]2.00[/TD]
[TD]0.50[/TD]
[/TR]
[TR]
[TD="align: left"]ABC Communication[/TD]
[TD]Central[/TD]
[TD]Multi[/TD]
[TD]Government[/TD]
[TD]1.00[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD="align: left"]United Company[/TD]
[TD]Eastern[/TD]
[TD]CND[/TD]
[TD]Private[/TD]
[TD]1.00[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD="align: left"]United Company[/TD]
[TD]Western[/TD]
[TD]BBT[/TD]
[TD]Private[/TD]
[TD]1.00[/TD]
[TD]0.50[/TD]
[/TR]
[TR]
[TD="align: left"]United Company[/TD]
[TD]Western[/TD]
[TD]BBT[/TD]
[TD]Private[/TD]
[TD]2.00[/TD]
[TD]0.50[/TD]
[/TR]
[TR]
[TD="align: left"]United Company[/TD]
[TD]Central[/TD]
[TD]BBT[/TD]
[TD]Private[/TD]
[TD]1.00[/TD]
[TD]1.00[/TD]
[/TR]
[TR]
[TD="align: left"]United Company[/TD]
[TD]Central[/TD]
[TD]CKQ[/TD]
[TD]Private[/TD]
[TD]1.00[/TD]
[TD]0.25[/TD]
[/TR]
[TR]
[TD="align: left"]United Company[/TD]
[TD]Central[/TD]
[TD]CKQ[/TD]
[TD]Private[/TD]
[TD]2.00[/TD]
[TD]0.25[/TD]
[/TR]
[TR]
[TD="align: left"]United Company[/TD]
[TD]Central[/TD]
[TD]CKQ[/TD]
[TD]Private[/TD]
[TD]3.00[/TD]
[TD]0.25[/TD]
[/TR]
[TR]
[TD="align: left"]United Company[/TD]
[TD]Central[/TD]
[TD]CKQ[/TD]
[TD]Private[/TD]
[TD]4.00[/TD]
[TD]0.25[/TD]
[/TR]
</tbody>[/TABLE]


Thanks,
Imran.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Its okay .... I didn't know about this rule. Accept my apologies and just cheer :) will take care from now on.
 
Upvote 0
For the reference of readers ....... I have got my desired output using following formula in Cell F2

=SUM(IF(COUNTIFS(A:A,A2,B:B,B2,C:C,C2,D:D,D2),1/COUNTIFS(A:A,A2,B:B,B2,C:C,C2,D:D,D2)))
 
Upvote 0
Glad to see you posted the solution for those who find this thread.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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