+ Reply to Thread
Results 1 to 2 of 2

How to align rows in one table, based on the table's leading column, with another table's

  1. #1
    Registered User
    Join Date
    03-21-2018
    Location
    Garland, Texas
    MS-Off Ver
    2013
    Posts
    1

    How to align rows in one table, based on the table's leading column, with another table's

    I have two tables. Both tables have a leading column with names, then other columns with data associated with those names. the second table has fewer names than the first table, although both tables are from the same population (the names in the second table are all found in the first column)I want to find a way to have Excel automatically align the rows from table 2 with the corresponding row in table 1. For instance, if John Smith and his associated data is on row 5 in table 1, I want Excel to find John Smith in Table 2, then move him and his associated data to row 5, so that all John Smith's data is aligned. Is there a way to do this?

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

    Re: How to align rows in one table, based on the table's leading column, with another tabl

    Hello geso5a and Welcome to Excel Forum.
    See if the following might work. On sheet2 column D is populated with a Match based formula that displays the relative row number (from sheet1) of the name in column A, using: =IFERROR(MATCH(A2,Sheet1!A$2:A$6),"")
    Sheet3 becomes the second 'table' formatted such that the names occupy the rows corresponding to sheet1 with the matching data being pulled from sheet2.
    The names listed in column A are placed using: =IFERROR(INDEX(Sheet2!A$2:A$4,MATCH(ROW()-1,Sheet2!D$2:D$4,0)),"")
    The data is pulled using: =IFERROR(INDEX(Sheet2!B$2:B$4,MATCH(A2,Sheet2!A$2:A$4,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.

+ 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. Replies: 0
    Last Post: 08-10-2016, 12:34 PM
  2. Add rows to table based on PIVOT table - Excel 2010
    By Pettaylor in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 07-27-2015, 08:49 AM
  3. Replies: 1
    Last Post: 11-25-2014, 08:35 PM
  4. Replies: 2
    Last Post: 04-16-2013, 06:17 AM
  5. Replies: 7
    Last Post: 01-25-2013, 05:17 PM
  6. Vlookup return the header name of table (Table of 4 column x 55 rows)
    By sanpat in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-09-2013, 11:23 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