+ Reply to Thread
Results 1 to 4 of 4

Insert Rows Within Multiple Ranges Missing Values 0 through 5

  1. #1
    Registered User
    Join Date
    10-03-2012
    Location
    Near Tampa, Florida
    MS-Off Ver
    | Work: 2007 | Home: 2013 |
    Posts
    25

    Insert Rows Within Multiple Ranges Missing Values 0 through 5

    I am attempting to do is insert missing values of 0-5 within multiple ranges in column B. The first range begins at B2 and ends just before the line containing fill color. All subsequent ranges begin after lines containing fill color and ending just before another.
    Is it possible to insert rows for the missing values? I would then also fill in B:D of those rows with 0s. That part I can understand how to write, well, at least inefficiently. The VB for inserting rows throws me.
    Any feedback is welcome.

    HTML Code: 
    Here is how my excel is laid out. I'm having trouble attaching it.
    Four columns A:D
    If you require any additional information I will respond as soon as possible. Thanks.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Insert Rows Within Multiple Ranges Missing Values 0 through 5

    Try using below code:-

    Please Login or Register  to view this content.
    insert rows for 1 to 4.xlsm

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    10-03-2012
    Location
    Near Tampa, Florida
    MS-Off Ver
    | Work: 2007 | Home: 2013 |
    Posts
    25

    Re: Insert Rows Within Multiple Ranges Missing Values 0 through 5

    The code runs well in your workbook. I ran it in mine and had very different results. It is entering the full range of values in between every cell in B opposed to filling in only what is missing.

    I also changed this in your code since I need values 0 to 5.
    Please Login or Register  to view this content.
    Nothing is happening when I click on Manage Attachments. I cannot upload my excel.
    Here is a screen shot of my excel.
    Book1.jpg

    Here is a screen shot after the VB is run.
    Book1Post.jpg

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Insert Rows Within Multiple Ranges Missing Values 0 through 5

    okay... click on "insert image" and upload excel workbook instead of an image


    Regards,
    DILIPandey
    <click on below * if this helps>

+ 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