Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default 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
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
Writing Macro to Run after changes are made Dave Excel Discussion (Misc queries) 2 November 5th 09 03:00 AM
macro writing dannyboy8 Excel Worksheet Functions 1 April 22nd 09 02:51 AM
Writing a macro RB[_2_] Excel Worksheet Functions 0 January 14th 08 05:40 PM
Macro-writing problems Richard Excel Discussion (Misc queries) 6 January 20th 07 10:45 PM
writing macro CN New Users to Excel 2 August 2nd 05 06:16 PM


All times are GMT +1. The time now is 02:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"