+ Reply to Thread
Results 1 to 7 of 7

Macro to Insert Rows

  1. #1
    Registered User
    Join Date
    12-03-2012
    Location
    Dorset, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Post Macro to Insert Rows

    I have a spreadsheet with a P&L that is replicated c.140 times for different business units (in the same worksheet). I need to add 9 rows above the "sales" line in each P&L which took me about 4 hours manually because of processing time to shift all the formulas down. I need to do this process 4 more times and hope someone can give me a macro code that would allow me to say; if cell in column A = "Sales" insert 9 rows?

    Thanks in advance (I know there are similar posts already but my macro language skills are fairly basic).

    Simon

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to Insert Rows

    Simon,
    With out testng on your data, try this one.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to Insert Rows

    Simon,
    With out testng on your data, try this one.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-03-2012
    Location
    Dorset, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to Insert Rows

    Thanks AB33, I am just testing, while it is thinking about it, will this only run the macro in the active worksheet,.. or try to run it in all worksheets within the workbook? If the latter i need to stop it now as it will probably crash the machine! lol

    Thanks again for such a speedy response by the way.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to Insert Rows

    Active only

  6. #6
    Registered User
    Join Date
    12-03-2012
    Location
    Dorset, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to Insert Rows

    Ignore my last post, the macro worked perfectly.
    THANKS ever so much, you just saved me at least a days work!

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to Insert Rows

    Simon,
    You are welcome! Please close this thread.
    On the top right hand side of this page, there is a button called thread tools, from the option, choose, close this thread

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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