I have several spreadsheets with between 2,000 and 3,000 rows of data. I'm
using them to import data into some accounting software. The format required
by the software is that each row of data is separated by a blank row. Short
of individually inserting several thousand rows, does anyone know another way
of changing the layout of the spreadsheet?
Well, you could add a helper column and enter 1, 3, 5, and copy down to
the bottom of what you've got. You could then put 2,4,6,8 ... in blank rows
until you have the max # of what you need. Then sort by the helper column.
Make sure you save a pristine copy and operate on a secondary copy so you
don't damage your good file.
quot;KopRedquot; gt; wrote in message
...
gt;I have several spreadsheets with between 2,000 and 3,000 rows of data. I'm
gt; using them to import data into some accounting software. The format
gt; required
gt; by the software is that each row of data is separated by a blank row.
gt; Short
gt; of individually inserting several thousand rows, does anyone know another
gt; way
gt; of changing the layout of the spreadsheet?
Here is a macro you can use. It's loosly written so it may take a minute to
run if the file is large.
Copy the code into a module in the Visual Basic Editor (Alt F11 to open
VBE). Then the macro InsertRows will be available when you select Tools,
Macro, Macros (or Alt F8).
Sub InsertRows()
intRow = Cells.SpecialCells(xlCellTypeLastCell).Row
For i = intRow To 1 Step -1
Rows(i).EntireRow.Insert
Next i
End Sub
quot;KopRedquot; wrote:
gt; I have several spreadsheets with between 2,000 and 3,000 rows of data. I'm
gt; using them to import data into some accounting software. The format required
gt; by the software is that each row of data is separated by a blank row. Short
gt; of individually inserting several thousand rows, does anyone know another way
gt; of changing the layout of the spreadsheet?
I just tried running this macro but, I receive the below message:
can't execute code in break module
what am I doint wrong?
CJquot;Erin Searfossquot; wrote:
gt; Here is a macro you can use. It's loosly written so it may take a minute to
gt; run if the file is large.
gt; Copy the code into a module in the Visual Basic Editor (Alt F11 to open
gt; VBE). Then the macro InsertRows will be available when you select Tools,
gt; Macro, Macros (or Alt F8).
gt;
gt; Sub InsertRows()
gt;
gt; intRow = Cells.SpecialCells(xlCellTypeLastCell).Row
gt; For i = intRow To 1 Step -1
gt; Rows(i).EntireRow.Insert
gt; Next i
gt;
gt; End Sub
gt;
gt; quot;KopRedquot; wrote:
gt;
gt; gt; I have several spreadsheets with between 2,000 and 3,000 rows of data. I'm
gt; gt; using them to import data into some accounting software. The format required
gt; gt; by the software is that each row of data is separated by a blank row. Short
gt; gt; of individually inserting several thousand rows, does anyone know another way
gt; gt; of changing the layout of the spreadsheet?
The actual message would read quot;cannot execute code in break modequot;
Means you are in break mode and must reset.
Alt F11 to get to VBE.
On Toolbar select Rungt;Reset
How you got into break mode is the question you should try to answer.
Run the macro again to see what happens.Gord Dibben MS Excel MVP
On Mon, 14 Apr 2008 11:09:02 -0700, CJ gt; wrote:
gt;I just tried running this macro but, I receive the below message:
gt;
gt;can't execute code in break module
gt;
gt;what am I doint wrong?
gt;
gt;CJ
gt;
gt;
gt;quot;Erin Searfossquot; wrote:
gt;
gt;gt; Here is a macro you can use. It's loosly written so it may take a minute to
gt;gt; run if the file is large.
gt;gt; Copy the code into a module in the Visual Basic Editor (Alt F11 to open
gt;gt; VBE). Then the macro InsertRows will be available when you select Tools,
gt;gt; Macro, Macros (or Alt F8).
gt;gt;
gt;gt; Sub InsertRows()
gt;gt;
gt;gt; intRow = Cells.SpecialCells(xlCellTypeLastCell).Row
gt;gt; For i = intRow To 1 Step -1
gt;gt; Rows(i).EntireRow.Insert
gt;gt; Next i
gt;gt;
gt;gt; End Sub
gt;gt;
gt;gt; quot;KopRedquot; wrote:
gt;gt;
gt;gt; gt; I have several spreadsheets with between 2,000 and 3,000 rows of data. I'm
gt;gt; gt; using them to import data into some accounting software. The format required
gt;gt; gt; by the software is that each row of data is separated by a blank row. Short
gt;gt; gt; of individually inserting several thousand rows, does anyone know another way
gt;gt; gt; of changing the layout of the spreadsheet?
- Oct 22 Sun 2006 20:10
Inserting alternate blank rows in Excel
close
全站熱搜
留言列表
發表留言