ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Insert blank rows (https://www.excelbanter.com/excel-discussion-misc-queries/251426-insert-blank-rows.html)

Deb

Insert blank rows
 
Rather than using the control button to select every other row, which can be
very time consuming when you have more than 100 rows, I am trying to figure
out how to auto-insert blank rows between pre-populated rows of information.

Mike H

Insert blank rows
 
Deb,

Try this macro. ALT+F11 to open VB editor. Right click 'ThisWorkbook' and
insert module and paste the code in on the right . Change the sheet name to
your sheet and run the code

Sub insert_rows()
Dim ws As Worksheet, x as long
Set ws = Sheets("Sheet3")
lastrow = ws.Cells(Cells.Rows.Count, "A").End(xlUp).Row
For x = lastrow To 2 Step -1
ws.Rows(x).EntireRow.Insert
Next
End Sub


Mike

"Deb" wrote:

Rather than using the control button to select every other row, which can be
very time consuming when you have more than 100 rows, I am trying to figure
out how to auto-insert blank rows between pre-populated rows of information.


Gord Dibben

Insert blank rows
 
Blank rows within your data range will give you problems with copy, paste,
sort, filter and probably other functions.

Do you really need those blank rows?

If just for appearance, doubling the row heights may help you.


Gord Dibben MS Excel MVP

On Fri, 18 Dec 2009 13:19:02 -0800, Deb
wrote:

Rather than using the control button to select every other row, which can be
very time consuming when you have more than 100 rows, I am trying to figure
out how to auto-insert blank rows between pre-populated rows of information.




All times are GMT +1. The time now is 03:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com