Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assuming that the Week Number is text and the Day and Date
are formulas (basically, =Bn+1 and =Cn+1 where n is the preceding row number produced by copying down), this macro should do what you want (assuming I understand your layout correctly)... Sub AddNextWeek() Dim LastRow As Long LastRow = Cells(Rows.Count, "A").End(xlUp).Row Cells(LastRow, "A").EntireRow.Resize(8, 3).FillDown Cells(LastRow + 1, "A").Resize(7).Value = Cells(LastRow, "A").Value + 1 End Sub I've tried pasting that in 'This Workbook', 'Sheet1' (where the grid is) and a Module. Nothing happens when I run it. Is your Week Number, Day and Date in Columns A, B and C respectively (as my code assumes)? -- Rick (MVP - Excel) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find and replace numeric strings in larger text strings | Excel Worksheet Functions | |||
Find Last Occurrence of Number | Excel Discussion (Misc queries) | |||
How to find number of pairs of strings from list of strings? | Excel Worksheet Functions | |||
find last occurrence | Excel Worksheet Functions |