Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
i want to change a date on a document automatically | Excel Worksheet Functions | |||
how do i automatically change the day and date | Excel Worksheet Functions | |||
Automatically Insert DATE, so that DATE will NOT change | Excel Worksheet Functions | |||
how do i make a date change automatically if i change one before . | Excel Discussion (Misc queries) | |||
calculate weeks from a start date ( not yr weeks) | Excel Worksheet Functions |