+ Reply to Thread
Results 1 to 9 of 9

Merge 2 columns into one with unique values

  1. #1
    Registered User
    Join Date
    02-13-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    19

    Merge 2 columns into one with unique values

    Hi
    The people on this site have been very helpful to me in the past, all of which I appreciate very much, so I am hoping someone can help me again.

    I have 2 columns of text, Column 1 A3:A50 & Column 2 B3:B50
    I would like to create 1 column of unique values in Column 3 A3:A??

    I have tried the function Unique(A3:B50) but the 2 columns stay separated, I need them in one list.

    If possible I would like to ignore blanks and if more is added to column 1 or 2 then column 3 would auto update.

    Fingers crossed

    Thank you in advance

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Merge 2 columns into one with unique values

    How are you defining Unique?

    Unique at the column A level whatever is in column B, or unique when you concatenate the column A & B cells

    If the latter then

    =UNIQUE(A3:A50&B3:B50)
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    02-13-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    19

    Re: Merge 2 columns into one with unique values

    It would be as if Column 1 and Column 2 were one column and column 3 would have the unique values without any duplications
    There are some values in col 1 that are also in col 2

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Merge 2 columns into one with unique values

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-13-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    19

    Re: Merge 2 columns into one with unique values

    Thank you both for a fast reply and very helpful. Fluff13 your answer is absolutely perfect.
    I wont pretend to understand most of the formula but hopefuly one day i will.
    Thank you both again
    Last edited by Gordonwats; 08-07-2021 at 02:10 AM. Reason: Missed something out

  6. #6
    Registered User
    Join Date
    02-13-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    19

    Re: Merge 2 columns into one with unique values

    The formula works fantastic but one thing I didn't foresee,
    each of the cells in the list has 2 more cells on the same row with info about the item in the list.
    If i add another item and it adds to the auto list it puts the info out of sequence.

    I hate to ask again but is there a way that if a new item is added,
    when it appears in the auto list can it be possible that it either
    1) puts it on a new row at the bottom of the list
    OR
    2) creates a new row for the new item

    The info about each item is added manually.

  7. #7
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Merge 2 columns into one with unique values

    There are instructions at the top of the page explaining how to attach your sample workbook.
    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.

  8. #8
    Registered User
    Join Date
    02-13-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    19

    Re: Merge 2 columns into one with unique values

    I have attached a file
    Column A is not relevant to this problem it just needs to be there for my benefit.
    Column B & C are the types that I need in a unique list
    Column E is the unique list generated by the formula from Fluff13
    Column F & G is info relating to the item in column E

    If I insert a new staple type in column B or C then the type (If unique) is added to column E
    Unfortunately it puts the data in Column F & G out of sync.
    If possible can the new staple type that is added go to the bottom of the existing list (this would be preferable) so that the info can be added manually.
    OR when the new type is added in column B or C and is created in Column E can it create a new row for itself.

    I realise that using the second suggestion would create a row in columns A-C as well but I can move the list below everything else so it wont matter.

    Sorry if this is a bit long winded.

    Hopefully you understand my gibberish and can help.

    Thank You
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Merge 2 columns into one with unique values

    The 2nd option is not possible, as a formula cannot insert rows.
    Unfortunately the 1st option is not possible either (or at least I have no idea how to do it). The formula is simply getting all the data from col C & stacking below col B & then removes blanks & duplicates.
    However if you create a lookup table with the data in F & G, you could then use a formula to pull that info in.

+ 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. Merge Rows But Move Unique Values To New Column
    By ThePhoenix in forum Excel General
    Replies: 1
    Last Post: 09-02-2020, 06:03 PM
  2. merge unique column values
    By max_max in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-07-2019, 03:03 PM
  3. Merge Duplicate Values with a Unique ID
    By afullerton in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-05-2014, 12:51 PM
  4. Merge Duplicate Rows unique values into single rows for an infinite amount of columns/rows
    By aimeecrystalaid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2013, 08:43 PM
  5. Merge rows according to unique IDs in column A- with multiple columns
    By inbars in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-26-2013, 08:03 PM
  6. How to merge duplicates while concatenating unique data from 3 columns
    By mdhillyer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-11-2012, 01:13 AM
  7. Merge two tables / unique values
    By ElmerS in forum Excel General
    Replies: 2
    Last Post: 07-14-2010, 11:32 AM

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