Counting Days of the Week

emelam

New Member
Joined
Nov 21, 2005
Messages
2
I have a list of formatted dates in Excel 2003 and I need to count how many Mondays are in that list. I'm having trouble finding a function that will work. Any help would be greatly appreciated.

emelam
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
Something like,

=SUMPRODUCT(--(WEEKDAY(A1:A10)=2))

If you range contains no empty cells, if there are,

=SUMPRODUCT(--(WEEKDAY(A1:A10)=2),--(A1:A10<>""))
 
Upvote 0

Greg Truby

MrExcel MVP
Joined
Jun 19, 2002
Messages
10,022
Brian, FWIW, your 1<sup>st</sup> formula works just fine for me on a range containing blanks.
 
Upvote 0

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
Greg Truby said:
Brian, FWIW, your 1<sup>st</sup> formula works just fine for me on a range containing blanks.

Greg,

Initially, I thought the blank cells would be counted as Sundays because of the default date 1/1/1900, but it counts Saturdays if the cell is empty. I can't figure why.
 
Upvote 0

Greg Truby

MrExcel MVP
Joined
Jun 19, 2002
Messages
10,022
That would be because 0 = Sat, 00-Jan-1900. And thanks, 'cause I didn't think to test looking for Sundays nor Saturdays.
 
Upvote 0

Forum statistics

Threads
1,195,989
Messages
6,012,716
Members
441,722
Latest member
tpaman1975

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
Top