counting single entries where duplicates appear within a specific date range

xxrichbxx

New Member
Joined
Sep 2, 2015
Messages
49
Office Version
  1. 365
Platform
  1. Windows
I am trying to create a count which will essentially only count a single entry from a range where there could be multiples.

I was looking at a combination of countifs and frequency, but was struggling to get my head around it.

I think that an example of my source data and what I expect to see would give a better understanding of the problem

Week Number Cell ID Date
29 12345 13/07/2020
29 98765 14/07/2020
29 12345 17/07/2020
30 12345 20/07/2020
30 12345 21/07/2020
30 98765 21/07/2020
30 11111 22/07/2020

Summary

Week 29 2
Week 30 3

Hopefully that makes sense.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Please update your user profile to show which version of excel you are using (click your user name at the top right of this page, then go to 'Account details' scroll down and check the correct box, then scroll to the bottom and save.

It is preferable to only select the version that you use most often so that the correct answers can be provided. Some formulas for office 365 do not work in any of the older versions, but if you only use 365 then a formula for an older version will be more complicated than necessary.
 
Upvote 0
What version of Excel are you using?

Please udpate your account details to show this, as it affects what functions you can use.
 
Upvote 0
Thanks for that
As you have 365 you may well have the dynamic array functions, like
+Fluff New.xlsm
ABCDEF
1
2291234513/07/2020292
3299876514/07/2020303
4291234517/07/2020
5301234520/07/2020
6301234521/07/2020
7309876521/07/2020
8301111122/07/2020
9
Main
Cell Formulas
RangeFormula
F2:F3F2=COUNT(UNIQUE(FILTER($B$2:$B$8,$A$2:$A$8=E2)))
 
Upvote 0
Hi both, didn't realise I had to.....
It's not mandatory, just makes things much easier for people helping you. Without the dynamic array functions that @Fluff has used, the formula would be far more complex and less efficient. The formula that @Fluff has provided will not work with older versions, but it is definitely preferable to the alternative if you are able to use it.
 
Upvote 0
@Fluff @jason75 thanks both.

Tried this and it doesn't look to be working (without doubt user error).

The function I used was =COUNT(UNIQUE(FILTER('Master Tracker'!$C$2:$C$486,'Master Tracker'!$A$2:$A$486=$A32))) which has unfortunately returned zero where I would have expected to see 149.

column C on the master tracker is the Cell ID and column A is the week number. The week number is calculated using the function Weeknum, but I am sure that this doesn't cause a problem.
 
Upvote 0
In that case can you please post some sample data using the XL2BB add-in.
 
Upvote 0
I think that I have done what you need.

This is the data I am using. Columns A & C are the columns I need.

Book3
ABCD
1Week NoPERMIT REFERENCECELL/SITE IDSTART DATE
228REQ000000757087ALD02707-Jul-20
328REQ000000767121ANT25710-Jul-20
428REQ000000755222BAH01708-Jul-20
528REQ000000717947BAN02808-Jul-20
628REQ000000717946BAN02806-Jul-20
728REQ000000778562BAR02710-Jul-20
828REQ000000753657BEX09307-Jul-20
929REQ000000798150BAN02813-Jul-20
1029REQ000000798156BAN02814-Jul-20
1129REQ000000798159BAN02815-Jul-20
Master Tracker


with the below summary

Book2
ABC
3WeekNumber of SitesNumber of Permits Requested
29280
30290
Dashboard
 
Upvote 0
The problem is that col C is text & not numbers (as shown in your op).
Try
=ROWS(UNIQUE(FILTER('Master Tracker'!$C$2:$C$486,'Master Tracker'!$A$2:$A$486=$A4)))
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,290
Members
449,149
Latest member
mwdbActuary

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