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

It doesn't have to be pretty, just as long as it works.

Perfect. Thank you.

"Rick Rothstein (MVP - VB)" wrote:

I'm guessing these aren't necessarily the most efficient formulas, but they
do appear to work...

First Monday of the Month
=================================
=DATE(YEAR(A1),MONTH(A1),1)-WEEKDAY(DATE(YEAR(A1),MONTH(A1),1))-7*(WEEKDAY(DATE(YEAR(A1),MONTH(A1),1))=1)+2

Last Sunday of the Month
=================================
=DATE(YEAR(A1),MONTH(A1)+1,7)-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,7))-7*(WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,7))=1)+1

Rick


"Bob" wrote in message
...
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 broadcast
month.

"Ron Rosenfeld" wrote:

On Thu, 6 Mar 2008 12:42:04 -0800, Bob
wrote:

I interchanged the word period with month. For example the month of May
2008
would begin with April 28 and end the final Sunday would be June 1.

Now I am completely confused. I always thought that May began on May 1
and
ended on May 31; and that June and April were not in the month of May.

Your going to have to be more explicit about your calendar rules in order
for
me to help you.
--ron