View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default My ref: RN0001 Find the first & last occurrence of a strings

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)