Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Writing Macro
I have never written a macro and need help with the code.
I need to take a set of data (1200 lines) and copy the data for 26 weeks, incrementing the date by 7 days each pass through. Any ideas as to what loop structure I should use and what the code may look like? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Writing Macro
Tazmmy,
Not clear where the date is, but let's assume in row 1, the code could be something like Dim i As Long, j As Long For i = 2 To 26 Cells(1, i).Value = Cells(1, 1).Value + (i - 1) * 7 For j = 2 To 100 Cells(j, i).Value = Cells(j, 1).Value Next j Next i -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tammy Klein" wrote in message ... I have never written a macro and need help with the code. I need to take a set of data (1200 lines) and copy the data for 26 weeks, incrementing the date by 7 days each pass through. Any ideas as to what loop structure I should use and what the code may look like? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Writing Macro to Run after changes are made | Excel Discussion (Misc queries) | |||
macro writing | Excel Worksheet Functions | |||
Writing a macro | Excel Worksheet Functions | |||
Macro-writing problems | Excel Discussion (Misc queries) | |||
writing macro | New Users to Excel |