Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need some sort of loop rRoutine which will copy the current row down 1 row
at a time until it reaches row 4000 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your goal is hardly to understand. Do you want to copy all rows (from row 1
to row 4000) one row down? Or ?? Please explain a little bit more in detail. regards reklamo "ordnance1" wrote: I need some sort of loop rRoutine which will copy the current row down 1 row at a time until it reaches row 4000 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I thought it was pretty clear but I will try again.
Lets say that I am currently on row 87, I want something that will copy the data in row 87 and then paste that data in to each row below row 87 until it reaches row 4000. "reklamo" wrote in message ... Your goal is hardly to understand. Do you want to copy all rows (from row 1 to row 4000) one row down? Or ?? Please explain a little bit more in detail. regards reklamo "ordnance1" wrote: I need some sort of loop rRoutine which will copy the current row down 1 row at a time until it reaches row 4000 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Patrick,
I haven't seen your orignal post so l dont know exactly what you are trying to achieve but this will do as you ask without having to loop Sub PasteRows() Rows("88:88").Copy Rows("89:4000").Activate ActiveSheet.Paste End Sub HTH Michael |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To read first the actual slected row you can use following:
Sub Makro1() ActualRow = Selection.Row Rows(ActualRow).Copy Rows(ActualRow + 1 & ":4000").Select ActiveSheet.Paste Cells(ActualRow, 1).Select Application.CutCopyMode = False End Sub regards reklamo "michael.beckinsale" wrote: Hi Patrick, I haven't seen your orignal post so l dont know exactly what you are trying to achieve but this will do as you ask without having to loop Sub PasteRows() Rows("88:88").Copy Rows("89:4000").Activate ActiveSheet.Paste End Sub HTH Michael |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your references to Rows 88 and 89 appear to be off by one... 'reklamo'
mentioned Row 87 and the rows below it. Adjusting for that, you macro can be simplified as follows... Sub PasteRows() Rows("87:87").Copy Rows("88:4000") End Sub Rick "michael.beckinsale" wrote in message ... Hi Patrick, I haven't seen your orignal post so l dont know exactly what you are trying to achieve but this will do as you ask without having to loop Sub PasteRows() Rows("88:88").Copy Rows("89:4000").Activate ActiveSheet.Paste End Sub HTH Michael |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to create copy & paste loop--rows to new sheets | Excel Programming | |||
Loop thru rows to copy to another excel spreadsheet | Excel Worksheet Functions | |||
Loop/copy rows variable times to new sheet | Excel Programming | |||
Copy Formula loop based on number of rows w/ data in a col B. | Excel Programming | |||
constructing a copy-paste loop that skips rows | Excel Programming |