Find and count days matching particular weekday, particular month and particular year from within a list of random dates

Intermediate

New Member
Joined
Apr 27, 2012
Messages
13
Hi,

I have a random list of dates from multiple years in column A:A. I would like to count how many of those random dates are eg. Saturdays in November 2013 or Mondays in October 2012. Any ideas?

Thanks in advance for your time and help.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
As is often the case - having written it out on a forum I've solved it myself. It's not an elegant solution but it does the job. If anyone has a cleaner way, with creating additional columns, please post. My clunky way is as follows:
List of random dates are eg. A1:A1000
Name Column B "DAY", and in B1, =WEEKDAY(A1,2) [2 counts the first day of the week as a Monday instead of Sunday]
Name Column C "MONTH", and in C1, =MONTH(A1)
Name Column D "YEAR", and in D1, =YEAR(A1)
Select B1:D1 and drag down to eg. D1000 to copy formulae alongside dates

In E1, =COUNTIFS(B:B,6,C:C,11,D:D,2013) [this will count rows where Day=Saturday, Month=November, Year=2013]
 
Upvote 0
Maybe this (a small modification in Andrew's formula):

Layout

Dates
Weekday
Month
Year
Result
21/08/2013
Saturday
November
2013
3
19/07/2013
Monday
October
2012
11
16/08/2013
07/08/2012
12/06/2012
04/12/2012
**
*********
**********
*****
******

<tbody>
</tbody>

Formula

Code:
In F2

=SUMPRODUCT(--(TEXT($A$2:$A$1000,"ddddmmmmyyyy")=$C2&$D2&$G2))

Markmzz
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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