#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default Insert extra lines

Here is a macro MVP Don Guillett wrote in reply to a similar request. It
assumes the 700 names are in column A. Column A is represented by the 1 in
Cells(Rows.Count, 1). Change it if necessary (A=1, B=2, etc.)

Sub insertrows()
'by Don Guillett
Dim i As Long
For i = Cells(Rows.Count, 1).End(xlUp).Row To 2 Step -1
Rows(i).Resize(4).Insert
Next i
End Sub

Put this code in a general Visual Basic module:
1. ALT-F11 brings up the Visual Basic Editor (VBE) window
2. ALT-I then M opens a fresh module
3. Paste in the code and close the VBE window
4. The macro is available to run, and will be saved with the workbook.

Press ALT-F8 to display the list of available macros in your workbook.
If you are new to macros, these links may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Hope this helps,

Hutch

"RENEE" wrote:

I have a worksheet sent to me with over 700 names on it. I need to put 4
extra lines under each name. Is there a way to do this without having to
individually insert those lines as this will take a long time. Thanks.

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
Complicated question adding extra horizontal lines Meenie Charts and Charting in Excel 2 June 19th 09 08:14 PM
When printing second copy, extra lines appear thanksforhelping Excel Discussion (Misc queries) 1 June 18th 08 11:10 PM
Inserting extra lines for comments in an excel sheet LittleAnn Setting up and Configuration of Excel 3 October 31st 07 11:31 PM
How do I remove extra blank lines in a column when I print? Nancy Excel Discussion (Misc queries) 1 June 7th 07 06:18 PM
Pivot needs BOTH cur/cum totals w/out extra cum cols/repeat lines LRock Excel Worksheet Functions 0 April 21st 06 02:24 AM


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