Formula to Count unique base on Criteria and monthly

Lukma

Board Regular
Joined
Feb 12, 2020
Messages
240
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi Friend

Am Having issue with the formula and i really need a help with to resolve it

In Column L2 am trying to count AD-222 unique without having duplicate count, appreciate with help from any one

Thanks

countif with unique_042917.xlsx
ABCDEFGHIJKL
1MangerMusProductTypeMonthJanuaryAD-222
201/01/2022 0:00Manager 11AD-2220.200.20Manager 14#DIV/0!
301/01/2022 6:00Manager 11AD-2220.200.20Manager 221
401/01/2022 6:00Manager 11AD-2220.200.20
501/01/2022 6:00Manager 11AD-2220.200.20
601/01/2022 6:00Manager 11AD-2220.200.20
701/02/2022 6:00Manager 22AD-2230.200.33
801/02/2022 6:00Manager 22AD-2230.200.33
901/02/2022 6:00Manager 22AD-2230.200.33
1004/01/2022 6:00Manager 22AD-2220.200.50
1104/01/2022 6:00Manager 22AD-2220.200.50
1202/01/2011 2:48Manager 33AD-2240.200.20
1302/01/2011 4:32Manager 33AD-2240.200.20
1402/01/2011 6:16Manager 33AD-2240.200.20
1502/01/2011 6:16Manager 33AD-2240.200.20
1601/01/2011 5:33Manager 33AD-2240.200.20
1704/02/2022 6:00Manager 24AD-2230.250.25
1804/02/2022 6:00Manager 24AD-2230.250.25
1904/02/2022 6:00Manager 24AD-2230.250.25
2004/02/2022 6:00Manager 24AD-2230.250.25
2105/01/2022 6:00Manager 15AD-2220.500.50
2205/01/2022 6:00Manager 15AD-2220.500.50
2305/01/2022 6:00Manager 16AD-2221.001.00
2405/01/2022 6:00Manager 17AD-2221.001.00
Sheet1
Cell Formulas
RangeFormula
F2:F24F2=1/COUNTIFS($C$2:$C$24,C2)
G2:G24G2=1/COUNTIFS($C$2:$C$24,C2,$D$2:$D$24,D2)
K2K2=SUMPRODUCT((L1=$D$2:$D$24)*1,1/COUNTIFS($C$2:$C$24,$C$2:$C$24))
L2L2=SUMPRODUCT((I2=$B$2:$B$24)*1,($D$2:$D$24=L$1)*1,1/COUNTIFS($C$2:$C$24,$C$2:$C$24,$D$2:$D$24,$D$2:$D$24,A2:A24,I1))
K3K3=SUMPRODUCT((I3=$B$2:$B$24)*1,$F$2:$F$24)
L3L3=SUMPRODUCT((I3=$B$2:$B$24)*1,($D$2:$D$24=L$1)*1,$G$2:$G$24)
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Maybe something like this?
This is an array function and must be entered with CTRL-SHIFT-ENTER

Book1
ABCDEFGHIJKL
1MangerMusProductTypeMonthJanuaryAD-222
21/1/22 0:00Manager 11AD-2220.20.2Manager 14.44
31/1/22 6:00Manager 11AD-2220.20.2Manager 221
41/1/22 6:00Manager 11AD-2220.20.2Manager 310
51/1/22 6:00Manager 11AD-2220.20.2
61/1/22 6:00Manager 11AD-2220.20.2
72/1/22 6:00Manager 22AD-2230.20.33333
82/1/22 6:00Manager 22AD-2230.20.33333
92/1/22 6:00Manager 22AD-2230.20.33333
101/4/22 6:00Manager 22AD-2220.20.5
111/4/22 6:00Manager 22AD-2220.20.5
121/2/11 2:48Manager 33AD-2240.20.2
131/2/11 4:32Manager 33AD-2240.20.2
141/2/11 6:16Manager 33AD-2240.20.2
151/2/11 6:16Manager 33AD-2240.20.2
161/1/11 5:33Manager 33AD-2240.20.2
172/4/22 6:00Manager 24AD-2230.250.25
182/4/22 6:00Manager 24AD-2230.250.25
192/4/22 6:00Manager 24AD-2230.250.25
202/4/22 6:00Manager 24AD-2230.250.25
211/5/22 6:00Manager 15AD-2220.50.5
221/5/22 6:00Manager 15AD-2220.50.5
231/5/22 6:00Manager 16AD-22211
241/5/22 6:00Manager 17AD-22211
Sheet1
Cell Formulas
RangeFormula
F2:F24F2=1/COUNTIFS($C$2:$C$24,C2)
G2:G24G2=1/COUNTIFS($C$2:$C$24,C2,$D$2:$D$24,D2)
K2K2=SUMPRODUCT((L1=$D$2:$D$24)*1,1/COUNTIFS($C$2:$C$24,$C$2:$C$24))
L2:L4L2=SUM(IF(FREQUENCY(IF(B$2:B$24=$I2,IF(MONTH($A$2:$A$24)=MONTH($I$1),IF($D$2:$D$24=$L$1,MATCH($D$2:$D$24&"/"&$C$2:$C$24,$D$2:$D$24&"/"&$C$2:$C$24,0)))),ROW($D$2:$D$24)-ROW($D$2)+1),1))
K3:K4K3=SUMPRODUCT((I3=$B$2:$B$24)*1,$F$2:$F$24)
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
Thanks AhoyNC

it works, and am grateful , however got it at end

 
Upvote 0

Forum statistics

Threads
1,214,913
Messages
6,122,207
Members
449,074
Latest member
cancansova

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