Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
MartyCole
 
Posts: n/a
Default Excel Macro to insert rows in a list


I'm sure this has been asked in the past but I couldn't find it in the
list of replies.

I need a macro to skip down a number (usually 5. sometimes 3 in
different spreadsheets) then insert a blank row. it needs to continue
until it reaches the end of the list (anywhere from 100 to 3000
lines).

I could do this in Lotus years ago but I'm lost in Excel...

Thanks for any help you can provide


--
MartyCole
------------------------------------------------------------------------
MartyCole's Profile: http://www.msusenet.com/member.php?userid=1217
View this thread: http://www.msusenet.com/t-1870429758

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Dim iLastRow As Long
Dim i As Long
Const nRows As Long = 5

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = (iLastRow \ nRows) * nRows + 1 To 1 Step -nRows
Rows(i).Insert
Next i


--

HTH

RP
(remove nothere from the email address if mailing direct)


"MartyCole" wrote in message
...

I'm sure this has been asked in the past but I couldn't find it in the
list of replies.

I need a macro to skip down a number (usually 5. sometimes 3 in
different spreadsheets) then insert a blank row. it needs to continue
until it reaches the end of the list (anywhere from 100 to 3000
lines).

I could do this in Lotus years ago but I'm lost in Excel...

Thanks for any help you can provide


--
MartyCole
------------------------------------------------------------------------
MartyCole's Profile: http://www.msusenet.com/member.php?userid=1217
View this thread: http://www.msusenet.com/t-1870429758



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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Insert rows Mr. G. Excel Worksheet Functions 3 March 31st 05 03:49 AM
insert a JPEG into EXCEL 2002 mckee Excel Discussion (Misc queries) 3 March 11th 05 05:03 PM
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? oil_driller Excel Discussion (Misc queries) 1 February 8th 05 09:34 AM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM


All times are GMT +1. The time now is 12:17 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"