ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro to add row between list of data... (https://www.excelbanter.com/excel-worksheet-functions/158382-macro-add-row-between-list-data.html)

misskitty

Macro to add row between list of data...
 
Can anyone provide me with a macro that will add a row between a lost of
data?? I've recorded on that will add a row but don't know how to extend it
through the entire list of data...if I insert 2 rows and stop recording, it
only adds two rows. I would like it to insert a row between the full list of
data or selected list.
Many thanks for any help given.

Don Guillett

Macro to add row between list of data...
 
Sub insertrows()
For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1
Rows(i).Insert
Next
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"misskitty" wrote in message
...
Can anyone provide me with a macro that will add a row between a lost of
data?? I've recorded on that will add a row but don't know how to extend
it
through the entire list of data...if I insert 2 rows and stop recording,
it
only adds two rows. I would like it to insert a row between the full list
of
data or selected list.
Many thanks for any help given.



misskitty

Macro to add row between list of data...
 
Another dumb question: Can you tell me how to use this...how to set it up as
a macro and run it (and I'll be out of your hair!!)
Many thanks....

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"misskitty" wrote in message
...
Can anyone provide me with a macro that will add a row between a lost of
data?? I've recorded on that will add a row but don't know how to extend
it
through the entire list of data...if I insert 2 rows and stop recording,
it
only adds two rows. I would like it to insert a row between the full list
of
data or selected list.
Many thanks for any help given.




misskitty

Macro to add row between list of data...
 
Don,
I've done it!!! Thank you so much. It did exactly what I wanted it to do.

Is there a tutorial or instructions for macros online anyplace? I'd like to
learn how to create them.

Thanks so much for your help.

"misskitty" wrote:

Another dumb question: Can you tell me how to use this...how to set it up as
a macro and run it (and I'll be out of your hair!!)
Many thanks....

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"misskitty" wrote in message
...
Can anyone provide me with a macro that will add a row between a lost of
data?? I've recorded on that will add a row but don't know how to extend
it
through the entire list of data...if I insert 2 rows and stop recording,
it
only adds two rows. I would like it to insert a row between the full list
of
data or selected list.
Many thanks for any help given.




Gord Dibben

Macro to add row between list of data...
 
David McRitchie's site for getting started.

http://www.mvps.org/dmcritchie/excel/getstarted.htm

Tushar Mehta's section on "beyond the macro recorder" has some good pointers on
cleaning up the code that was created by the recorder.

http://www.tushar-mehta.com/excel/vb...rder/index.htm


Gord Dibben MS Excel MVP

On Fri, 14 Sep 2007 13:38:03 -0700, misskitty
wrote:

Is there a tutorial or instructions for macros online anyplace? I'd like to
learn how to create them.



misskitty

Macro to add row between list of data...
 
Looks like a good starting point for me. Thanks so much.


"Gord Dibben" wrote:

David McRitchie's site for getting started.

http://www.mvps.org/dmcritchie/excel/getstarted.htm

Tushar Mehta's section on "beyond the macro recorder" has some good pointers on
cleaning up the code that was created by the recorder.

http://www.tushar-mehta.com/excel/vb...rder/index.htm


Gord Dibben MS Excel MVP

On Fri, 14 Sep 2007 13:38:03 -0700, misskitty
wrote:

Is there a tutorial or instructions for macros online anyplace? I'd like to
learn how to create them.





All times are GMT +1. The time now is 12:41 PM.

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