+ Reply to Thread
Results 1 to 3 of 3

insert rows based on text values in cells

  1. #1
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    insert rows based on text values in cells

    Hello and thanks in advance,

    I regularly run a report that comes out in a slightly different format each time depending on whether or not there is data for specific criteria. for instance (sample attached): criteria a, b, and c are in rows, 1, 2, and 3 in columns. a, b, and c are expected to repeat themselves several times. if there is no data in one instance of b then you may see something like abcacabc.

    I'd like to loop through each row in column a, check to make sure that it is the correct value (either a, b, or c) and if not, insert a blank row so I can then copy the data to my final project without having to worry about formatting.

    the example above would then become abca cabc

    thanks again!
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: insert rows based on text values in cells

    Hi Simarui,

    Try this:

    Please Login or Register  to view this content.
    Last edited by xladept; 02-20-2014 at 07:14 PM. Reason: Cautionary Change
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Valued Forum Contributor
    Join Date
    01-10-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    651

    Re: insert rows based on text values in cells

    perfection

    thank you.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: insert rows based on text values in cells

    You're welcome! And, thanks for the rep!

+ 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. [SOLVED] Insert rows based on the current cell value and, then, copy some cells into the new rows
    By Excel-RZ in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-03-2013, 05:19 PM
  2. I need to insert rows using macros, based on rows values. Please Help!
    By reservoirimgaging in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-19-2013, 02:13 PM
  3. Insert rows based on values in column
    By scott p in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2013, 01:58 PM
  4. [SOLVED] Insert number of rows with data to new sheets based on values in cells
    By keithtran12 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-28-2013, 11:57 AM
  5. Insert rows based on start/end values
    By JP Romano in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-09-2012, 10:41 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