ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Inserting new row (https://www.excelbanter.com/excel-worksheet-functions/203160-inserting-new-row.html)

Sure

Inserting new row
 
I have several rows of data and want to insert a new row alternatively.
Suppose I have 10 rows, I want a row to be inserted so that the 2nd row
becomes 3 rd row. Then insert another row between 3rd row (2nd row
previously) and the 4th row so that the 4th row becomes the 5th row. Is it
possible to do it automatically? If so, how?

Bob Phillips[_3_]

Inserting new row
 
For i = Cells(Rows.Count,"A").End(xlUp).Row To 1 Step -1

Rows(i+1).Insert
Next i

--
__________________________________
HTH

Bob

"Sure" wrote in message
...
I have several rows of data and want to insert a new row alternatively.
Suppose I have 10 rows, I want a row to be inserted so that the 2nd row
becomes 3 rd row. Then insert another row between 3rd row (2nd row
previously) and the 4th row so that the 4th row becomes the 5th row. Is it
possible to do it automatically? If so, how?




Ashish Mathur[_2_]

Inserting new row
 
Hi,

In column B, enter 1-10 in range B1:B10. Now in B11:B20, type 1:10 again.
Now select A1:B20 and sort in ascending order on column B.

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Sure" wrote in message
...
I have several rows of data and want to insert a new row alternatively.
Suppose I have 10 rows, I want a row to be inserted so that the 2nd row
becomes 3 rd row. Then insert another row between 3rd row (2nd row
previously) and the 4th row so that the 4th row becomes the 5th row. Is it
possible to do it automatically? If so, how?




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

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