Tuesday, June 28, 2011

yogi_Count Number Of Specified WeekDay In A Given Time Period

Yogi Anand, D.Eng, P.E.                                         Google Spreadsheet                            www.energyefficientbuild.com
Termanator13 said:
how do I calculate the number of Fridays or any day of the week in a month?
I have a expence sheet, and I need to know how often I get paid in a month to better plan for this, this is on Fridays.
-------------------------------------------------------------------
In the following I have provided solution to the problem in a more generalized way

4 comments:

  1. Hello.

    This works well as far as up to 14 instances of the specified weekday. I'm not sure what it could be though...but the formula in E2 just returns 14 whenever there are really 15+ of those days.

    Is there anything in the formula preventing returns of higher than 14?

    ReplyDelete
    Replies
    1. by the way, I'm referring to the tab named, "GivenRangeOfFromToDates"

      Delete
  2. Hi Rafael:

    Can you post some some sample data for which you are not getting correct result.

    Cheers!
    Yogi

    ReplyDelete
  3. Hi Rafael:

    Make sure your sheet has the required number of rows in it otherwise the needed count would be under reported.

    ReplyDelete