+ Reply to Thread
Results 1 to 6 of 6

Auto Insert row to specific range

  1. #1
    Registered User
    Join Date
    12-16-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007, 2013
    Posts
    14

    Auto Insert row to specific range

    I have a workbook in which I run a macro whose job is to clean up.
    the macro deletes a column with information and then cut and paste the other information so everything moves forward and the last column is clean.
    everything runs as it should until someone deletes a row.
    I now want to add a row but using the macro. In other words, the rows must be fixed for the macro to work.

    Please Help me, this is the code.
    Please Login or Register  to view this content.
    it's a loop that needs one more feature.

  2. #2
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Auto Insert row to specific range

    Hi,

    Try this macro to shift the data left and make room on the right side again...

    Please Login or Register  to view this content.
    Regards,
    Rudi

  3. #3
    Registered User
    Join Date
    12-16-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007, 2013
    Posts
    14

    Re: Auto Insert row to specific range

    good advice, but I think I was a bit confusing macro extends over 12 sheets

    This is the full code I use and it works fine until someone deletes a row with out adding a new I'm sorry I can not upload the file if I do that it is seen as leaking information.
    Hope you understand.
    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Auto Insert row to specific range

    OK...try this...

    Please test on a copy of the file. TX

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-16-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007, 2013
    Posts
    14

    Re: Auto Insert row to specific range

    dident work, it failed were the red text are.

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    07-04-2012
    Location
    Cape Town, RSA
    MS-Off Ver
    Office 365 ProPlus
    Posts
    1,050

    Re: Auto Insert row to specific range

    Can you tell me if your sheet structure is looking similar to this (See image)
    I tested the macro on sheets similar to my image, where it shifts the numbers one column to the left each time it runs; and it works fine...no error.

    If your sheet is not like this structure, and there are blank cells at cell C4 and surrounding cells, the macro will fail as it needs to identify the range to shift. Blank cells or structure that is not similar will cause problems. Please confirm file structure.

    TX

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Complex VBA problem auto insert date and time, auto insert comment, etc.
    By rojashan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2013, 09:40 PM
  2. Auto insert a comment according to a specific cell value
    By hero96559 in forum Excel General
    Replies: 3
    Last Post: 10-02-2012, 04:56 PM
  3. [SOLVED] Insert row at the bottom (specific range of columns)
    By marcmarina in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-29-2012, 03:15 AM
  4. Insert row for specific range using if function
    By ashmott in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2011, 03:39 AM
  5. Auto insert a range
    By fastballfreddy in forum Excel General
    Replies: 1
    Last Post: 05-08-2006, 07:45 PM

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