ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MACRO TO UPDATE DATES ! (https://www.excelbanter.com/excel-programming/281052-macro-update-dates.html)

Jay Dean

MACRO TO UPDATE DATES !
 


In my Excel sheet the ranges C4:C10, C12:C18, C20:C26, C28:C34 and
C36:C42 contain dates in the usual successive order. For example, if
C4:C10 contain the dates 10/1/03 to 10/7/03, then C12:C18 will contain
the dates 10/8/03 to 10/14/03, C12:C18 will contain 10/15/03 to 10/21/03
and so on.
I need a macro that when executed will update the dates to start
over. For example, if the last date in the last range C36:C42 is
11/4/2003, then to start over C4:C10 will update as 11/5/03 to 11/11/03,
C12:C18 will update as 11/12/03 to 11/18/03 , and so on. I would
appreciate your assistance. Thank you !

Jay Dean

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Tom Ogilvy

MACRO TO UPDATE DATES !
 

Range("C4").Value = Range("C42").Value + 1

--
Regards,
Tom Ogilvy


"jay dean" wrote in message
...


In my Excel sheet the ranges C4:C10, C12:C18, C20:C26, C28:C34 and
C36:C42 contain dates in the usual successive order. For example, if
C4:C10 contain the dates 10/1/03 to 10/7/03, then C12:C18 will contain
the dates 10/8/03 to 10/14/03, C12:C18 will contain 10/15/03 to 10/21/03
and so on.
I need a macro that when executed will update the dates to start
over. For example, if the last date in the last range C36:C42 is
11/4/2003, then to start over C4:C10 will update as 11/5/03 to 11/11/03,
C12:C18 will update as 11/12/03 to 11/18/03 , and so on. I would
appreciate your assistance. Thank you !

Jay Dean

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Jay Dean

MACRO TO UPDATE DATES !
 

Tom -
Your code only updates cell C4. I need one that updates the other
range of cells below it as specified in my earlier post. Any help will
be appreciated. Thanks.

Jay Dean


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Tom Ogilvy

MACRO TO UPDATE DATES !
 
If you used formulas to build your successive dates, the macro would be
sufficient.

--
Regards,
Tom Ogilvy


"jay dean" wrote in message
...

Tom -
Your code only updates cell C4. I need one that updates the other
range of cells below it as specified in my earlier post. Any help will
be appreciated. Thanks.

Jay Dean


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





All times are GMT +1. The time now is 04:28 PM.

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