ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can you add a blank row, per every other row, on an entire (https://www.excelbanter.com/excel-discussion-misc-queries/96896-how-can-you-add-blank-row-per-every-other-row-entire.html)

Laura

How can you add a blank row, per every other row, on an entire
 
excel spreadsheet, without having to go row by row?

Gord Dibben

How can you add a blank row, per every other row, on an entire
 
You could do it easily with a macro.

Why would you do this?

If for appearance and better readability, just select all rows and double the
height.

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

Change the 2000 to whatever range you want.


Gord Dibben MS Excel MVP

On Thu, 29 Jun 2006 15:34:02 -0700, Laura
wrote:

excel spreadsheet, without having to go row by row?



Text2Col

How can you add a blank row, per every other row, on an entire
 


"Laura" wrote:

excel spreadsheet, without having to go row by row?


One way would be to:
1) insert a new column next to your data
2) number the columns 1,3,5,7,etc. (use 'Fill' and then 'Series')
3) number some blank lines 2,4,6,8,etc. (use 'Fill' and then 'Series')
4) sort your data by the new column.
5) delete the new column.


All times are GMT +1. The time now is 04:48 AM.

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