+ Reply to Thread
Results 1 to 3 of 3

Count Row with Same Values and Insert Blank Rows

  1. #1
    Registered User
    Join Date
    03-23-2017
    Location
    Windsor Locks, CT
    MS-Off Ver
    2013
    Posts
    38

    Count Row with Same Values and Insert Blank Rows

    I'm working with a series of cells that need rows inserted if it's not a multiple of 4 (e.g. 4,8,12,16,20,24, etc....). Here's what I have:

    G1: 100
    G2: 100
    G3: 100
    G4: 100
    DON'T INSERT ROW
    G5:100
    INSERT 3 ROWS
    G6:200
    G7:200
    G8:200
    INSERT 1 ROW
    Etc.....

    This is the coding that I've come up with so far, but I need formulas to see decimals such as .25 (add 3 rows), .50 (add 2 rows), .75 (add 1 row). If that makes sense.

    Please Login or Register  to view this content.
    Any help would be much appreciated.
    Last edited by Fotis1991; 04-03-2017 at 08:55 AM. Reason: Pls use code tags

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,301

    Re: Count Row with Same Values and Insert Blank Rows

    Try it like this - if you want to duplicate the lines rather than just insert lines, then uncomment this line

    '.EntireRow.Copy 'Uncomment this line if you want to insert copied rows

    I was also guessing that you have headers in row 1 of sheet Database.....


    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 04-03-2017 at 11:56 AM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    03-23-2017
    Location
    Windsor Locks, CT
    MS-Off Ver
    2013
    Posts
    38

    Re: Count Row with Same Values and Insert Blank Rows

    Quote Originally Posted by Bernie Deitrick View Post
    Try it like this - if you want to duplicate the lines rather than just insert lines, then uncomment this line

    '.EntireRow.Copy 'Uncomment this line if you want to insert copied rows

    I was also guessing that you have headers in row 1 of sheet Database.....


    Please Login or Register  to view this content.
    Bernie,

    The coding worked flawlessly. I removed the entirerow.copy because it wasn't what I needed. Thanks again!!

+ 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. Insert rows based on count and fill rows with adjacent values
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-19-2015, 02:57 PM
  2. VBA : insert blank rows between base upon count of each rows with criteria..need help??
    By Jhon Mustofa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-10-2013, 12:30 AM
  3. insert blank rows between base on count of rows, help???/
    By Jhon Mustofa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2013, 03:25 AM
  4. [SOLVED] Macro to insert blank rows below rows with values
    By haleakala17 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-10-2013, 11:48 AM
  5. Replies: 18
    Last Post: 05-26-2011, 04:07 AM
  6. Insert values and skip blank rows
    By aaronprice in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-17-2009, 11:59 AM
  7. How do I count then insert blank rows accordingly?
    By pss218 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-09-2007, 01:13 PM

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