To count the number of Mondays in a month in an Excel cell, use the following formula:
=sumproduct(--(weekday(row(indirect((eomonth(today(),-1)+1) & ":" & (eomonth(today(),0)))))=2))
In December 2013, this returns 5. How do you alter the formula for any day of the week? Change the 2 at the end of the formula to the number corresponding to the day of the week:
As always, I welcome your comments. Click on the Comment link below; it may say "No" or have a number in front of it.
=sumproduct(--(weekday(row(indirect((eomonth(today(),-1)+1) & ":" & (eomonth(today(),0)))))=2))
In December 2013, this returns 5. How do you alter the formula for any day of the week? Change the 2 at the end of the formula to the number corresponding to the day of the week:
- Sunday = 1
- Monday = 2
- Tuesday = 3
- Wednesday = 4
- Thursday = 5
- Friday = 6
- Saturday = 7
As always, I welcome your comments. Click on the Comment link below; it may say "No" or have a number in front of it.
No comments:
Post a Comment
Put comments here.