+ Reply to Thread
Results 1 to 6 of 6

Auto Insert Rows

  1. #1
    Registered User
    Join Date
    05-07-2024
    Location
    Ontario, Canada
    MS-Off Ver
    365
    Posts
    3

    Auto Insert Rows

    Is there a way to automatically insert rows so that all the data is on the same row. For example, is there a way to make EE OP LIFE INS on the same row instead of manually inserting rows on the last 2 data sets? I have to insert rows manually to make sure they are all on row 3, and this is becoming very tedious. Thanks.
    Attached Images Attached Images

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,484

    Re: Auto Insert Rows

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,956

    Re: Auto Insert Rows

    Short answer - no.

    However, they may be a way to use formulas and helper columns to pull the data to where you need it to be
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    05-07-2024
    Location
    Ontario, Canada
    MS-Off Ver
    365
    Posts
    3

    Auto Insert Rows

    I have attached a copy of my workbook. I am trying to find a way to automatically space out the rows so that all the data is aligned. For example, to make sure EE OP LIFE INS is all on the same row, I inserted a row in cells E3:I3. Is there a way for excel to automatically line up all my data points so everything is on the same row (EE CI is on the same row, EE OP LIFE INS is on the same row ETC) so that I don't have to manually insert rows to make sure all the words are on the same row.

    Thanks!
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,732

    Re: Auto Insert Rows

    It only took me less than three minutes to select blocks of cells and drag them down until the rows aligned as illustrated on Sheet2.
    That said, using Ford's suggestion of helper columns, Sheet1 illustrates how the descriptions can be aligned.
    1. Use formulas such as the ones in columns N:P to find the correct row number: =IF(F2<>"",IFERROR(MATCH(F2,B$1:B$19,0),SUM(N1,1)))
    2. Use the following formula to get the row labels and descriptions from columns A:B in columns R:S =IF(A2<>"",A2,"")
    3. Use formulas such as the ones in columns U:V, X:Y and AA:AB to get the row labels and descriptions from columns D:E, H:I and K:L =IFERROR(INDEX(E$2:E$20,MATCH(ROW(),$N$2:$N$20,0)),"")
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,894

    Re: Auto Insert Rows

    I don't know if you want a formula solution or not. You would have to use VBA if you want to do this "in place". But if you're looking to view it like you want it, you could use formulas to do this.
    The formulas here are very long, however, they have some benefits. You don't have to change the formulas as your data grows (as long as you establish the first range long enough - in this example, I'm including 1000 rows). They other columns don't even half to be in the same order - it re-orders them so they then are in the same order.

    I put these on Sheet 2. For the main/first columns (A&B), I have this in cell A2:
    =FILTER(Sheet1!A2:B1000,Sheet1!A2:A1000<>"")

    For the second group of columns (E&F), in cell E2, enter:

    Please Login or Register  to view this content.
    For H&I, in cell H2, enter:
    Please Login or Register  to view this content.
    And for the last columns, enter this in K2:
    Please Login or Register  to view this content.
    See attached.
    Attached Files Attached Files
    Last edited by Gregb11; 05-11-2024 at 10:59 PM.

+ 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] auto insert rows to table
    By Dineth in forum Excel General
    Replies: 3
    Last Post: 05-30-2015, 07:15 AM
  2. Replies: 0
    Last Post: 03-06-2013, 05:44 PM
  3. Auto insert of rows
    By jhelliar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2008, 04:31 AM
  4. Auto-insert Rows
    By illknight in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-05-2008, 01:10 PM
  5. Auto insert rows?
    By jillteresa in forum Excel General
    Replies: 1
    Last Post: 11-28-2006, 01:52 PM
  6. Auto Insert of Rows
    By Gar3th in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2005, 01:06 AM
  7. [SOLVED] Auto Insert of Rows
    By Gar3th in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-06-2005, 05:06 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