How to exclude duplicates in a COUNTIFS formula

Aurora_S

New Member
Joined
Apr 12, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi, I'm trying to count number of intake dates within a month but sometimes there will be mulitple intakes in one day so I just want to count each date once.
The data is part of a bigger spreadsheet which I can't change and contains data from previous and subsequent months.

In the sample extract, there's a drop-down cell B1 which gives the month to be calculated (this reads as August but is in 'mmmm' date format of 01/08/22)
My base formula is =COUNTIFS($A:$A,">="&$B$1,$A:$A,"<="&EOMONTH($B$1,0)) but obviously this will counts duplicate dates in the list which need to be excluded.

Thanks
 

Attachments

  • Book1.JPG
    Book1.JPG
    94.2 KB · Views: 32

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi & welcome to MrExcel.
How about =ROWS(UNIQUE(FILTER(A5:A1000,MONTH(A5:A1000)=MONTH(B1))))
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about =ROWS(UNIQUE(FILTER(A5:A1000,MONTH(A5:A1000)=MONTH(B1))))
Fabulous - thanks so much!
Initially I tried to use A:A in the formula (as there are thousands) and it didn't work but altered it to a row range and it worked perfectly. I hadn't realised it would make such a difference.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,276
Messages
6,171,140
Members
452,381
Latest member
Nova88

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