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

Right. Thank you.

"Ron Rosenfeld" wrote:

On Fri, 7 Mar 2008 11:03:00 -0800, Bob wrote:

the beginning of the month would start as the formula states (first Monday of
a calendar month. The previous month ends the Sunday before that date.

February ended on Sunday, March 2 and March began on Monday, March 3.

March ends on Sunday April 6 and April begins Monday April 7.


Those rules are different from your original rules.

In one of your original examples, you indicated the start of May would be April
28. But the first Monday of the calendar Month May is May 5.

If you want to use these rules, you need different formulas:

Again, with some date in the required calendar month in column A

Beginning: =A2-DAY(A2)+8-WEEKDAY(A2-DAY(A2)+6)

End:

=DATE(YEAR(A2),MONTH(A2)+1,7)-WEEKDAY(DATE(YEAR(A2),MONTH(A2)+1,6))
--ron