Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default macro to copy cells to intermittent rows in a spreadsheet

im trying to copy formulas from cells h,i, and j in row 2 to
the same cells in rows 52,102,152,202,252,302,etc.... up to row 49902
i thought a macro could do the trick but im having a hard time with the
language
any help or ideas would be greatly appreciated
thank you
brock
spokane, wa
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 638
Default macro to copy cells to intermittent rows in a spreadsheet

Sub thishere()
hForm = Range("H2").Formula
iForm = Range("A2").Formula
jForm = Range("J2").Formula
For i = 52 To 49902 Step 50
Cells(i, 8).Formula = hForm
Cells(i, 9).Formula = iForm
Cells(i, 10).Formula = jForm
Next i
End Sub

BROCK8292 wrote:
im trying to copy formulas from cells h,i, and j in row 2 to
the same cells in rows 52,102,152,202,252,302,etc.... up to row 49902
i thought a macro could do the trick but im having a hard time with the
language
any help or ideas would be greatly appreciated
thank you
brock
spokane, wa


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default macro to copy cells to intermittent rows in a spreadsheet

try testing this and then just change the step 3 to whatever is desired such
as 52
Sub copymodrows()
For i = 1 To 12 Step 3
Range("h1").Resize(, 3).Copy Cells(i, "h")
Next
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"BROCK8292" wrote in message
...
im trying to copy formulas from cells h,i, and j in row 2 to
the same cells in rows 52,102,152,202,252,302,etc.... up to row 49902
i thought a macro could do the trick but im having a hard time with the
language
any help or ideas would be greatly appreciated
thank you
brock
spokane, wa


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default macro to copy cells to intermittent rows in a spreadsheet

You will also want to change the 12 to whatever desired.
Sub copymodrows()

maybe use a variable to determine the last row

lr-cells(rows.count,"h").end(xlup).row
for i= 1 to lr step 52


For i = 1 To 12 Step 3
Range("h1").Resize(, 3).Copy Cells(i, "h")
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...
try testing this and then just change the step 3 to whatever is desired
such as 52
Sub copymodrows()
For i = 1 To 12 Step 3
Range("h1").Resize(, 3).Copy Cells(i, "h")
Next
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"BROCK8292" wrote in message
...
im trying to copy formulas from cells h,i, and j in row 2 to
the same cells in rows 52,102,152,202,252,302,etc.... up to row 49902
i thought a macro could do the trick but im having a hard time with the
language
any help or ideas would be greatly appreciated
thank you
brock
spokane, wa



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 281
Default macro to copy cells to intermittent rows in a spreadsheet

Hi,

Try this:

Sub cpyr()
Range("H2:J2").Select
Selection.Copy
For i = 52 To 49902 Step 50
Range("H" & Trim(Str(i))).Select
ActiveSheet.Paste
Next i
End Sub
--
Farhad Hodjat


"BROCK8292" wrote:

im trying to copy formulas from cells h,i, and j in row 2 to
the same cells in rows 52,102,152,202,252,302,etc.... up to row 49902
i thought a macro could do the trick but im having a hard time with the
language
any help or ideas would be greatly appreciated
thank you
brock
spokane, wa



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default macro to copy cells to intermittent rows in a spreadsheet

thank you all for ur help

"Don Guillett" wrote:

You will also want to change the 12 to whatever desired.
Sub copymodrows()

maybe use a variable to determine the last row

lr-cells(rows.count,"h").end(xlup).row
for i= 1 to lr step 52


For i = 1 To 12 Step 3
Range("h1").Resize(, 3).Copy Cells(i, "h")
Next
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...
try testing this and then just change the step 3 to whatever is desired
such as 52
Sub copymodrows()
For i = 1 To 12 Step 3
Range("h1").Resize(, 3).Copy Cells(i, "h")
Next
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"BROCK8292" wrote in message
...
im trying to copy formulas from cells h,i, and j in row 2 to
the same cells in rows 52,102,152,202,252,302,etc.... up to row 49902
i thought a macro could do the trick but im having a hard time with the
language
any help or ideas would be greatly appreciated
thank you
brock
spokane, wa




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
How to copy the same formulas in a spreadsheet -Macro? klafert Excel Worksheet Functions 3 May 9th 07 10:10 PM
Loop thru rows to copy to another excel spreadsheet eighthman11 Excel Worksheet Functions 0 October 9th 06 09:21 PM
Create Macro to Copy Data from one spreadsheet to another Cheri Excel Discussion (Misc queries) 19 July 21st 06 10:54 PM
Macro to copy cells to rows below [email protected] Excel Discussion (Misc queries) 1 January 20th 06 06:59 PM
copy qualifying rows to another spreadsheet acpharmd Excel Worksheet Functions 1 December 29th 04 09:45 PM


All times are GMT +1. The time now is 12:57 PM.

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

About Us

"It's about Microsoft Excel"