View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default Identifing Weeks in a Month.

In A1: =TODAY()

In B1:
=TEXT(DATE(YEAR($A$1),MONTH($A$1),(ROWS($1:1)-1)*7+1)-WEEKDAY(DATE(YEAR($A$1),MONTH($A$1),(ROWS($1:1)-1)*7+1))+2,"mmmm
dd, yyyy")&" -
"&TEXT(DATE(YEAR($A$1),MONTH($A$1),(ROWS($1:1)-1)*7+1)-WEEKDAY(DATE(YEAR($A$1),MONTH($A$1),(ROWS($1:1)-1)*7+1))+8,"mmmm dd, yyyy")

copy from B1 down

The result will be:

June 29, 2009 - July 05, 2009
July 06, 2009 - July 12, 2009
July 13, 2009 - July 19, 2009
July 20, 2009 - July 26, 2009
July 27, 2009 - August 02, 2009




"GEM" wrote:

Thank you Barry,

I want to start on a Monday, if the first day of the month starts on a
friday, I would like to identify the monday right before that friday first of
the month. For example this month, the 1st of July started on a Wednesday, so
I would like to start on Monday June 29th. And the last day of July will be
on a Friday, so I would like it to end on Sunday August 2nd, because they are
complete weeks from Monday - Sunday.

Did I get my message throught??


"barry houdini" wrote:


How do you define the "first" week of the month? In your example June
29th clearly starts in the previous month, but presumably week 1 of
August starts on 3rd August, is there a rule?


--
barry houdini
------------------------------------------------------------------------
barry houdini's Profile: http://www.thecodecage.com/forumz/member.php?userid=72
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=121210