Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inserting rows between each entry
I have a thousand lines of data, and there are 5 fields of information
which describes all 1000 lines of data. Another words, I have data from cell A1:E1000. I am interested in inserting between each row 5 lines. For example: Active 24 Hour Fitness Worldwide, Inc. 925-543-3100 Active 99 Cents Only Stores 323-980-8145 Active A And G, Inc 714-765-0400 Should appear as: Active 24 Hour Fitness Worldwide, Inc. 925-543-3100 Active 99 Cents Only Stores 323-980-8145 Active A And G, Inc 714-765-0400 I know about simply inserting rows into the appropriate place, and pressing CONTROL Y a few times. However, I'd like to automate this process. I've tried recording macros, but this doesn't seem to work. Every time I execute the macro, only the top line gets "expanded/heightened". |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inserting rows between each entry
You can do it easily with a macro.
Sub InsertRows() Application.ScreenUpdating = False Dim numRows As Integer Dim r As Long numRows = 5 For r = 1000 To 1 Step -1 ActiveSheet.Rows(r + 1).Resize(numRows).EntireRow.Insert Next r Application.ScreenUpdating = True End Sub Gord Dibben MS Excel MVP On 13 Sep 2006 14:55:16 -0700, "Brablo" wrote: I have a thousand lines of data, and there are 5 fields of information which describes all 1000 lines of data. Another words, I have data from cell A1:E1000. I am interested in inserting between each row 5 lines. For example: Active 24 Hour Fitness Worldwide, Inc. 925-543-3100 Active 99 Cents Only Stores 323-980-8145 Active A And G, Inc 714-765-0400 Should appear as: Active 24 Hour Fitness Worldwide, Inc. 925-543-3100 Active 99 Cents Only Stores 323-980-8145 Active A And G, Inc 714-765-0400 I know about simply inserting rows into the appropriate place, and pressing CONTROL Y a few times. However, I'd like to automate this process. I've tried recording macros, but this doesn't seem to work. Every time I execute the macro, only the top line gets "expanded/heightened". |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Inserting rows between each entry
Brablo,
Are you sure you want to do this? You won't any longer have a standard (1 row per item) table on which Excel can do many operations on (unless you'll be inserting similar records in the new empty rows). I just have the feeling you're heading down a road you might find is less travelled for some good reasons. If this is for printing purposes, have you considered increasing the row height to get the space you need? -- Earl Kiosterud www.smokeylake.com ----------------------------------------------------------------------- "Brablo" wrote in message oups.com... I have a thousand lines of data, and there are 5 fields of information which describes all 1000 lines of data. Another words, I have data from cell A1:E1000. I am interested in inserting between each row 5 lines. For example: Active 24 Hour Fitness Worldwide, Inc. 925-543-3100 Active 99 Cents Only Stores 323-980-8145 Active A And G, Inc 714-765-0400 Should appear as: Active 24 Hour Fitness Worldwide, Inc. 925-543-3100 Active 99 Cents Only Stores 323-980-8145 Active A And G, Inc 714-765-0400 I know about simply inserting rows into the appropriate place, and pressing CONTROL Y a few times. However, I'd like to automate this process. I've tried recording macros, but this doesn't seem to work. Every time I execute the macro, only the top line gets "expanded/heightened". |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
inserting rows automatically? | Excel Discussion (Misc queries) | |||
Inserting new rows | Excel Worksheet Functions | |||
inserting rows | Excel Discussion (Misc queries) | |||
inserting columns within certain rows only | Excel Discussion (Misc queries) | |||
Inserting Rows w/formulas question | Excel Worksheet Functions |