+ Reply to Thread
Results 1 to 8 of 8

Merge lists with headings

  1. #1
    Registered User
    Join Date
    03-14-2012
    Location
    Peoria, AZ, USA
    MS-Off Ver
    Office 365
    Posts
    11

    Merge lists with headings

    I doubt that title is descriptive enough. I'll just give you an example of what I'm trying to do

    List 1
    A 12
    D 5
    E 17
    G 24
    K 15
    L 9
    Q 2
    V 20

    List 2
    B 16
    D 8
    L 10
    P 36
    V 6

    Merged
    List 1 List 2
    A 12
    B 16
    D 5 8
    E 17
    G 24
    K 15
    L 9 10
    P 36
    Q 2
    V 20 6

    Any ideas? Thank you in advance.

  2. #2
    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,946

    Re: Merge lists with headings

    Try this.

    1. give each table a range name (let me know if you dont know how to do that)
    I used List_1 and List_2 (range names dont like spaces, so I used underscore()

    Then to do the extract...
    A
    B
    C
    D
    E
    F
    1
    List 1 Merged
    2
    A
    12
    List 1 List 2
    3
    D
    5
    A
    12
    4
    E
    17
    B
    16
    5
    G
    24
    D
    5
    8
    6
    K
    15
    E
    17
    7
    L
    9
    G
    24
    8
    Q
    2
    K
    15
    9
    V
    20
    L
    9
    10
    10
    P
    36
    11
    List 2 Q
    2
    12
    B
    16
    V
    20
    6
    13
    D
    8
    14
    L
    10
    15
    P
    36
    16
    V
    6

    E3=IFERROR(VLOOKUP($D3,INDIRECT(SUBSTITUTE(E$2," ","_")),2,0),"")
    copied down and across
    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

  3. #3
    Registered User
    Join Date
    03-14-2012
    Location
    Peoria, AZ, USA
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Merge lists with headings

    Hi FDibbins. Thank you for such a quick response!

    I think this will work. From what I can tell, the formula you wrote requires you to first have the alphabetical list (the one in column D in your table). The function doesn't generate that list, right?

    Even if that's the case, I think all I really need to do is just copy the first columns of both lists together and do a "remove duplicates". Then I can use your formula. Sounds right?

  4. #4
    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,946

    Re: Merge lists with headings

    Yes, you would need that lost 1st, but that could be easily created IF the list does not change. yes, correct, just copy 1 list then copy the 2nd below, and use Remove Duplicates

  5. #5
    Registered User
    Join Date
    03-14-2012
    Location
    Peoria, AZ, USA
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Merge lists with headings

    Perfect! Thanks for your help!

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Merge lists with headings

    Hi theorize99,

    What if you simply appended the second table to the bottom of the first table and then did a Pivot Table. You'd need to add a column, showing which list the data was from.
    PT for theorize99.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Registered User
    Join Date
    03-14-2012
    Location
    Peoria, AZ, USA
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Merge lists with headings

    Also an interesting idea. I'm headed home for the night, but I'll give this one a shot tomorrow. Thank you for your idea!

  8. #8
    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,946

    Re: Merge lists with headings

    Happy to help and thanks for the feedback

+ 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: 1
    Last Post: 05-10-2019, 06:50 AM
  2. Use field headings in my mail merge
    By thefribbler in forum Word Formatting & General
    Replies: 1
    Last Post: 06-03-2014, 08:30 PM
  3. Replies: 1
    Last Post: 01-03-2013, 01:30 AM
  4. [SOLVED] Transpose and Merge headings
    By sharahoff in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-03-2012, 02:47 PM
  5. How do I merge 2 excel file with the same column headings into 1?
    By Yulichka in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 08-30-2012, 08:37 AM
  6. merge two lists together
    By wlan in forum Excel General
    Replies: 1
    Last Post: 02-25-2012, 01:55 PM
  7. [SOLVED] Column Headings in Lists
    By Kikipelli2000 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-08-2006, 05:15 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