Adding rows?

C

cambanis

Hello everyone!
I have a spreadsheet full of data (560x15) and I would like to add one new
row bellow each one existing (1120x15).
Can I do it? (I can manually select rows one by one having CTRL pressed and
then insert Insert Row, but it takes a lot...)
Thanks
 
B

Bill Kuunders

Use a new column
put in the top part of that column a number series 1 3 5 7 9 etc till all
lines with existing data have a number
and in the bottom part of that column 2 4 6 8 etc
then select the whole range and sort by this new column
delete the column after.
Greetings from New Zealand
Bill Kuunders
 
D

Don Guillett

change "a" to suit your column

Sub addrows()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1
Rows(i).Insert
Next
End Sub
 
G

Gord Dibben

Do you really need the extra rows?

If for appearance only, select all the rows and double their height through
Format>Row>Height or drag the bottom selected row to a size you like.

If you want the rows inserted Bill has provided a method.

OR you could use a macro if you so choose.

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


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top