Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatically Change Date every 2 weeks


I have pretty much ripped out my hair trying to figure this out.
There's gotta be a way. Please help!!

I have a spreadsheet in which there is one cell I would like to have
automatically change every two weeks.

For example, on 12/30/2005, I would like this cell to automatically
change to 01/12/2006. Then, on 01/13/2006, I would like this cell to
automatically change to 01/26/2006.

Is there any way to do this? I assume I will need some kind of VB
programming.



--
GYRO
------------------------------------------------------------------------
GYRO's Profile: http://www.excelforum.com/member.php...o&userid=29994
View this thread: http://www.excelforum.com/showthread...hreadid=496848

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Automatically Change Date every 2 weeks

gyro -

The simplest way to do this is with an auto open sub on the Thisworkbook
module. Perhaps like:

Private Sub Workbook_Open()
With Sheet1.Cells(1, 1)
If .Value < Date Then .Value = .Value + 13
End With
End Sub

- voodooJoe

use an auto open sub to examine the value and change it if it mneets
"GYRO" wrote in message
...

I have pretty much ripped out my hair trying to figure this out.
There's gotta be a way. Please help!!

I have a spreadsheet in which there is one cell I would like to have
automatically change every two weeks.

For example, on 12/30/2005, I would like this cell to automatically
change to 01/12/2006. Then, on 01/13/2006, I would like this cell to
automatically change to 01/26/2006.

Is there any way to do this? I assume I will need some kind of VB
programming.



--
GYRO
------------------------------------------------------------------------
GYRO's Profile:
http://www.excelforum.com/member.php...o&userid=29994
View this thread: http://www.excelforum.com/showthread...hreadid=496848



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatically Change Date every 2 weeks


NA Wrote:
gyro -

The simplest way to do this is with an auto open sub on the
Thisworkbook
module. Perhaps like:

Private Sub Workbook_Open()
With Sheet1.Cells(1, 1)
If .Value < Date Then .Value = .Value + 13
End With
End Sub

- voodooJoe

use an auto open sub to examine the value and change it if it mneets
"GYRO" wrote in
message
...

I have pretty much ripped out my hair trying to figure this out.
There's gotta be a way. Please help!!

I have a spreadsheet in which there is one cell I would like to have
automatically change every two weeks.

For example, on 12/30/2005, I would like this cell to automatically
change to 01/12/2006. Then, on 01/13/2006, I would like this cell

to
automatically change to 01/26/2006.

Is there any way to do this? I assume I will need some kind of VB
programming.



--
GYRO

------------------------------------------------------------------------
GYRO's Profile:
http://www.excelforum.com/member.php...o&userid=29994
View this thread:

http://www.excelforum.com/showthread...hreadid=496848
Hi NA,

The trouble with this is:
Instead of just keeping two weeks ahead of todays date.
It Advances two weeks EVERY time you open the WorkBook.
So if you open the WorkBook four times today, the date would be
advanced eight weeks instead of two weeks.


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile: http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=496848

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default Automatically Change Date every 2 weeks

dp -

you wrote:
The trouble with this is:
Instead of just keeping two weeks ahead of todays date.
It Advances two weeks EVERY time you open the WorkBook.
So if you open the WorkBook four times today, the date would be
advanced eight weeks instead of two weeks.



actually, the value only changes ONE TIME EVERY 2 WEEKS

With Sheet1.Cells(1, 1)
If .Value < Date Then .Value = .Value + 13
End With

say val = 1/1/06 & today is 1/4/06
val < date so val changes to 1/1/06 + 13 = 1/14/06

when you open again on 1/4 or on 1/5 or on 1/13 val (1/14) is greater than
Date, so nothin happens
when you open on 1/15, val < date so date advances 2 weeks.

the MOD formula from bpeltzer, however, is clearly a better solution.


"Desert Piranha"
<Desert.Piranha.20xn0m_1136079600.9669@excelforu m-nospam.com wrote in
message news:Desert.Piranha.20xn0m_1136079600.9669@excelfo rum-nospam.com...

NA Wrote:
gyro -

The simplest way to do this is with an auto open sub on the
Thisworkbook
module. Perhaps like:

Private Sub Workbook_Open()
With Sheet1.Cells(1, 1)
If .Value < Date Then .Value = .Value + 13
End With
End Sub

- voodooJoe

use an auto open sub to examine the value and change it if it mneets
"GYRO" wrote in
message
...

I have pretty much ripped out my hair trying to figure this out.
There's gotta be a way. Please help!!

I have a spreadsheet in which there is one cell I would like to have
automatically change every two weeks.

For example, on 12/30/2005, I would like this cell to automatically
change to 01/12/2006. Then, on 01/13/2006, I would like this cell

to
automatically change to 01/26/2006.

Is there any way to do this? I assume I will need some kind of VB
programming.



--
GYRO

------------------------------------------------------------------------
GYRO's Profile:
http://www.excelforum.com/member.php...o&userid=29994
View this thread:

http://www.excelforum.com/showthread...hreadid=496848
Hi NA,


--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile:
http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=496848



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 180
Default Automatically Change Date every 2 weeks

=TODAY()+MOD(DATE(2006,1,12)-TODAY(),14) should do it.


"GYRO" wrote:


I have pretty much ripped out my hair trying to figure this out.
There's gotta be a way. Please help!!

I have a spreadsheet in which there is one cell I would like to have
automatically change every two weeks.

For example, on 12/30/2005, I would like this cell to automatically
change to 01/12/2006. Then, on 01/13/2006, I would like this cell to
automatically change to 01/26/2006.

Is there any way to do this? I assume I will need some kind of VB
programming.



--
GYRO
------------------------------------------------------------------------
GYRO's Profile: http://www.excelforum.com/member.php...o&userid=29994
View this thread: http://www.excelforum.com/showthread...hreadid=496848




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatically Change Date every 2 weeks


Thanks VooDooJoe. I tried what you suggested but that doesn't seem t
work to well. It seems I would need some kind of formula or somethin
in the cell first and VB programming behind it..

--
GYR
-----------------------------------------------------------------------
GYRO's Profile: http://www.excelforum.com/member.php...fo&userid=2999
View this thread: http://www.excelforum.com/showthread.php?threadid=49684

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
i want to change a date on a document automatically Gary Excel Worksheet Functions 3 May 20th 09 03:59 PM
how do i automatically change the day and date Caveman Excel Worksheet Functions 3 October 12th 05 09:26 PM
Automatically Insert DATE, so that DATE will NOT change Cie Excel Worksheet Functions 4 April 4th 05 05:51 PM
how do i make a date change automatically if i change one before . dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 09:21 PM
calculate weeks from a start date ( not yr weeks) Todd F. Excel Worksheet Functions 6 November 27th 04 05:53 PM


All times are GMT +1. The time now is 10:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"