Definition... hadn't thought about that,.
Week is a number between 1 and 53, with the first day of the week being
Monday and the first week being the first week with 4 or more days in it.
Hope that answers the question...
I'm trying to write a function that gets a week number and a year and can
determine the first and last day of the week (outputting a string).
If I use DatePart, I can set those options and get a week number. I can
compare it to the week number I passed into the function, if it's the same,
then I have the first day of the week. If not, add 1 day. Check again.
I was hoping there was a better way to do it. This process seems (to me
anyway) unnecessarily complicated. I thought if someone knew of an existing
function that did the same thing, then I might try it.
Hope that answers the question.
Cheers,
Jay
--
Disregard, this is so I can find my post later.
***postedbyJay***
"Tom Ogilvy" wrote:
> What is your definition of week number.
>
> http://www.cpearson.com/excel/weeknum.htm
>
> --
> Regards,
> Tom Ogilvy
>
>
>
>
> "Jay" wrote:
>
> > Hello all,
> >
> > I've searched through the posts, but I can't seem to find an answer so I'm
> > posting my question.
> >
> > I'm looking for a way to determine the date range (first and last day) of a
> > week when given the week number.
> >
> > So if I'm given week 25 of 2007, I would find the first day is June 18, 2007
> > to June 24, 2007 (assuming first day of the week is Monday).
> >
> > All I can think of is to count up from Jan. 01, 2007 and if it isn't the
> > right week number, keep counting up until I find the first date that matches
> > the week number.
> >
> > Just curious is anyone knows of an existing (or more elegant) way to
> > determine the date range of a week.
> >
> > Any suggestions are appreciated.
> >
> > Thanks,
> > Jay
> > --
> > Disregard, this is so I can find my post later.
> > ***postedbyJay***