LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,510
Default insert and copy

Hi Darius,

To be sure of giving you the correct answer, need to confirm some info.

insert a row between row 4 and 5 then insert row between row 9 and 10. Do
you mean between what is row 9 and 10 after the row is inserted between 4 and
5 or between what was the original row 9 and 10 before inserting the row
between 4 and 5?

I have assumed the latter and the following code should do it. However, if
not correct then get back to me.

Ensure that you back up your workbook before running the code in case it
does not do what you expect.

Sub InsertRows()
Dim i As Long

For i = 49180 To 4 Step -5
Rows(i).Insert
Next i

End Sub


--
Regards,

OssieMac


"Darius" wrote:

Hi there;
I need to insert a row between row 4 and 5 and then jump 5 rows further and
do it again (insert row between row 9 and 10) again 5 jumps and insert row
between 14 and 15. this goes to finally between rows 49180 and 49181.

thanks for any help

 
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
Copy and insert dee Excel Discussion (Misc queries) 0 April 8th 08 11:30 AM
Copy Insert Macro Schwimms Excel Discussion (Misc queries) 15 February 2nd 08 12:02 PM
Copy and paste versus copy and insert copied cells Alana New Users to Excel 1 September 28th 07 08:58 PM
Move/Copy or Copy/Insert worksheet? kjk Excel Discussion (Misc queries) 0 December 15th 06 02:40 PM
Copy & Insert from another xls JWF Excel Discussion (Misc queries) 1 March 14th 06 12:08 PM


All times are GMT +1. The time now is 08:40 AM.

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"