View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default days of the week formulas

Just goes to show that there is usually more than one way to accomplish a goal.

"Ron Rosenfeld" wrote:

On Thu, 6 Mar 2008 13:14:07 -0800, Bob wrote:

This isn't a calendar month but more of a complete monthly period beginning
with a Monday and ending with a Sunday.
If the calendar month ends on a Tuesday the period would continue to the end
of the week through Sunday. If the calendar month begins after a Monday the
period would begin with the preceding Monday. Also know as a broadc


I think I have it now.

If I understand you correctly, the beginning of the period is the latest Monday
that is equal to or less the beginning of a Month.

The end of the period is the earliest Sunday that is equal to or greater than
the end of that Month.

With any date in a particular calendar month in A1:

Beginning of Period:

=A1-DAY(A1)+2-WEEKDAY(A1-DAY(A1))

End of Period:

=A1+39-DAY(A1+32)-WEEKDAY(A1+32-DAY(A1+33))

--ron