View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JBeaucaire[_90_] JBeaucaire[_90_] is offline
external usenet poster
 
Posts: 222
Default Weekly or Bi-weekly dates

Sorry, this is the correct one for a one week rotation:

=Today()+CHOOSE(WEEKDAY(P9,1),1,2,3,4,5,6,7,8,9)

Then, for biweekly, one of these two should work for you

=IF(ISODD(INT((TODAY()-P9)/7)),
TODAY()+CHOOSE(WEEKDAY(P9,1),1,2,3,4,5,6,7),
TODAY()+CHOOSE(WEEKDAY(P9,1),8,9,10,11,12,13,14))

or

=IF(ISODD(INT((TODAY()-P9)/7)),
TODAY()+CHOOSE(WEEKDAY(P9,1),8,9,10,11,12,13,14),
TODAY()+CHOOSE(WEEKDAY(P9,1),1,2,3,4,5,6,7))
--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"JBeaucaire" wrote:

I think this will do it for you:

=Today()+CHOOSE(WEEKDAY(P9,1),1,2,3,4,5,6,7,8,9)

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.

"ash3154" wrote in message
...
Not sure if this can be done with simple formula or will this req.
programming:
Please provide example:

Basically, the Start of week can be any give day (ie Friday, or Sunday, or
Monday).
If the week starts on 2/9/09 (in this case its a Monday), than I would
like
to show next week will be
(2/16/09) in cell p10

I would like to keep looping this over and over again, as I would like to
show the new date in cell P10:
so for example if today is Feb 09 2009 (Monday), next week in P10 should
be
2/16/09, but if today is 2/17 or 2/19, than the P10 should read 2/23/09.

If someone starts on Friday -- 2/20/09, next week in P10 should read
2/27/09
and than if I open the spreadsheet on 3/10/09 the date should read
3/13/09.

Also, can i use the same formula if its on a bi-weekly basis? (A different
sheet)
Ash