+ Reply to Thread
Results 1 to 4 of 4

Insert rows and copy macro

  1. #1
    Registered User
    Join Date
    04-14-2009
    Location
    philadelphia, pa
    MS-Off Ver
    Excel 2003
    Posts
    2

    Insert rows and copy macro

    This should be fairly easy, but I am not familiar with progamming a macro. I have the following data:

    NH5101
    NH5104
    NH5106
    NH5107

    There are many more lines after these, but I'm using this as the example. I want to start at NH5101, insert 4 more lines and copy down. So that the data ends up looking like this.

    NH5101
    NH5101
    NH5101
    NH5101
    NH5101
    NH5104
    NH5104
    NH5104
    NH5104
    NH5104....

    I need 5 lines of each. All the data is in one column and it is the only data on the sheet at this point. I'm using Excel 2003. Thanks

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Insert rows and copy macro

    jcdifi26,

    With the cursor clicked in the first cell of the range.

    Please Login or Register  to view this content.

    Then run the "InsertRows" macro.


    Have a great day,
    Stan
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  3. #3
    Registered User
    Join Date
    04-14-2009
    Location
    philadelphia, pa
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Insert rows and copy macro

    Awesome Stan, thanks

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Insert rows and copy macro

    Give this macro a try:
    Please Login or Register  to view this content.
    OOPS...late to the party, sorry Stan.
    Last edited by JBeaucaire; 04-14-2009 at 06:21 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1