Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I insert 20 rows between each row of text?

I have a two column list of 265 names. I want to insert 20 blank rows between
each name. Is there some easy way to do this? Seems like an easy and somewhat
stupid question. Sorry!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I insert 20 rows between each row of text?

Sub InsertRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
numRows = 20
For r = 265 To 1 Step -1
ActiveSheet.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
Application.ScreenUpdating = True
End Sub

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + r to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.


Gord Dibben MS Excel MVP

On Fri, 2 Feb 2007 14:28:00 -0800, PaigeinFL
wrote:

I have a two column list of 265 names. I want to insert 20 blank rows between
each name. Is there some easy way to do this? Seems like an easy and somewhat
stupid question. Sorry!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,180
Default How do I insert 20 rows between each row of text?

If you can limit yourself to 254 names
and want an easy way without VBA, then go to
Tools Options Custom Lists Import list from cells, and enter
$A$1:$A$254
Enter the name at A1 into C1 and select it and 20 blank cells
below it. Drag the fill handle down to row 5334.

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 convert a month to a quarter ...... Epinn New Users to Excel 26 May 3rd 23 07:45 PM
How can I insert and delete rows within a locked cell range column Gordon Cole Excel Worksheet Functions 0 October 1st 06 11:30 AM
How to protect some cells, but able to insert rows elsewhere? Ingeniero1 Excel Discussion (Misc queries) 6 April 3rd 06 10:49 AM
Copy/Paste Rows that Contain Specific Text Mike Woodard Excel Worksheet Functions 1 March 8th 06 07:35 PM
can't insert more rows even though not at max rows nikkiamber Excel Worksheet Functions 3 April 4th 05 10:45 PM


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