Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default 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.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default 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.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default 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.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to fix macro to list data underneath each other jeannie v Excel Worksheet Functions 17 June 24th 07 10:21 PM
data validation list: how do i 'force' a user to enter data from the list? showsomeidnow Excel Discussion (Misc queries) 4 May 1st 07 05:49 PM
data validation list: how do i 'force' a user to enter data from the list? showsomeidnow Excel Discussion (Misc queries) 2 April 29th 07 11:09 PM
Data Val list Excel 97 fire macro rgarber50 Excel Discussion (Misc queries) 4 October 9th 05 05:19 PM
How to create a macro that compares a list to another list Rampa New Users to Excel 1 January 13th 05 01:15 PM


All times are GMT +1. The time now is 06:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"