ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Weekly or Bi-Weekly dates (https://www.excelbanter.com/excel-programming/423610-weekly-bi-weekly-dates.html)

ash3154

Weekly or Bi-Weekly dates
 
I am not sure if this can be done with programming or a simple formula

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? (this is on a
separate sheet, but the all the cell references are the same).
Ash

JBeaucaire[_152_]

Weekly or Bi-Weekly dates
 

This will work for one week:

=TODAY()+CHOOSE(WEEKDAY(P9,1),1,2,3,4,5,6,7)

And for bi-weekly, one of these two formulas:

=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))

or

=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))


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=60064


ash3154

Weekly or Bi-Weekly dates
 
Hey JBeaucaire,

I just inserted the weekly, and it works great, -- will be trying the
bi-weekly later.

"JBeaucaire" wrote:


This will work for one week:

=TODAY()+CHOOSE(WEEKDAY(P9,1),1,2,3,4,5,6,7)

And for bi-weekly, one of these two formulas:

=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))

or

=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))


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=60064



Rick Rothstein

Weekly or Bi-Weekly dates
 
I just inserted the weekly, and it works great,

It does? Then I must not have understood your original question at all.

--
Rick (MVP - Excel)


"ash3154" wrote in message
...
Hey JBeaucaire,

I just inserted the weekly, and it works great, -- will be trying the
bi-weekly later.

"JBeaucaire" wrote:


This will work for one week:

=TODAY()+CHOOSE(WEEKDAY(P9,1),1,2,3,4,5,6,7)

And for bi-weekly, one of these two formulas:

=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))

or

=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))


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile:
http://www.thecodecage.com/forumz/member.php?userid=73
View this thread:
http://www.thecodecage.com/forumz/sh...ad.php?t=60064





All times are GMT +1. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com