LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default Get date from prior sheet and add 7 days

Hi Everyone,
I'm rewritting an old .123 file to Excel. There's lots of sheets and all
have a hard-coded date in cell C3. I want to start with the last hard-coded
date (April 26 sheet) and start using a formula to increment that date by 7
days to come up with May 3, May 10 on the next new sheet, and so on.
VB code I've rewritten so far copies a template sheet (no date in the
template in c3) to a new sheet and adds it to the left of the April 26 sheet,
sets C3 in the new sheet equal to some text I'm just goofing around with to
test, and then renames the sheet to the value in C3. I really need the value
in C3 to equal C3 from the prior sheet + 7. I've included the code below.
Thanks!
Sub NewSheet()
Sheets("Blank Template").Select
Sheets("Blank Template").Copy AFTER:=Sheets(2)
Range("C3").Select
ActiveCell.FormulaR1C1 = "go Crunch!"
Dim wks As Worksheet
For Each wks In ActiveWindow.SelectedSheets
wks.Name = wks.Range("C3").Value
Next wks

 
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
how do i insert todays date in a spread sheet just prior to print wayne h Excel Worksheet Functions 2 May 25th 10 07:15 PM
auto highlighting x#of days prior to & after any given date Moovysheek Excel Worksheet Functions 0 February 10th 10 06:34 AM
Weekending Date w/Less Than 3 days Assoc. with Prior Month MoneyMan Excel Worksheet Functions 7 September 14th 09 06:45 PM
Count Days more than 180 days prior to today Gregory Day Excel Worksheet Functions 4 March 28th 08 10:16 PM
Subtracting a time from a day and 2 days prior flucky07 Excel Discussion (Misc queries) 2 June 13th 06 06:40 PM


All times are GMT +1. The time now is 07:06 PM.

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"