Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Entering Dates Across Seven Worksheets and Navigating
Hello there,
In a workbook with 7 sheets (named Period 1, Period 2, ..., Period 7), I would like to attach code to a macro that does the following: 1.) Go to the sheet named Period 1, 2.) Find the last used cell in row 12, 3.) Insert today's date into the next cell to the right (formatted mm/ dd/yy). 4.) Do this to all of the sheets whose name starts with "Period." 5.) Lastly, put the cursor 3 cells below the newly entered date on the sheet named Period 1. Thank you very much for any and all help on this code. Tracy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Entering Dates Across Seven Worksheets and Navigating
Sub this()
Dim ws As Worksheet, lCol As Integer, r As Long r = 12 For Each ws In ActiveWorkbook.Worksheets With ws If Left(.Name, 6) = "Period" Then lCol = .Cells(r, "IV") _ .End(xlToLeft).Column + 1 .Cells(r, lCol).NumberFormat = _ "mm/dd/yy;@" .Cells(r, lCol).Value = Date If .Name = "Period 1" Then _ Application.Goto .Cells(r + 3, lCol) End If End With Next ws End Sub wrote: Hello there, In a workbook with 7 sheets (named Period 1, Period 2, ..., Period 7), I would like to attach code to a macro that does the following: 1.) Go to the sheet named Period 1, 2.) Find the last used cell in row 12, 3.) Insert today's date into the next cell to the right (formatted mm/ dd/yy). 4.) Do this to all of the sheets whose name starts with "Period." 5.) Lastly, put the cursor 3 cells below the newly entered date on the sheet named Period 1. Thank you very much for any and all help on this code. Tracy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Auto Entering Dates Across Seven Worksheets and Navigating
That's awesome. Thanks JW.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
navigating between worksheets | Excel Discussion (Misc queries) | |||
Navigating among worksheets | Excel Programming | |||
Navigating between worksheets. | Excel Worksheet Functions | |||
Entering Dates and auto-completing | Excel Programming | |||
Navigating between worksheets | Excel Programming |