+ Reply to Thread
Results 1 to 10 of 10

How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numbers?

  1. #1
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Unhappy How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numbers?

    Hi, again, this is david..




    The problem is that i pasted in 3 cells a 3 set of numbers,
    -.each cell have a not repeated numbers
    AND
    -.Some numbers appear 1 time with in the 3 cells
    BUT
    -.some numbers might will be repeated with in the 3 cells

    e.g :

    Cell F8-> 08-31-25-15-27-29-36-14-17-23
    Cell F9-> 21-22-23-24-25-26-27-28-29-30
    Cell F10-> 04-03-02-01-31-32-33-34-35-36
    --------------------------------------------
    Cell F11->


    i need to find a formula or macro to perform the follow :

    1-.Merge The 3 sets of numbers from cell F8, F9, and F10 and Copy in "Cell F11"
    2-.Sort the 3 sets of Numbers from Low to High
    3-.Show each numbers just once In Cell F11 (no repeated numbers)

    e.g


    Cell F8-->08-31-25-15-27-29-36-14-17-23 <- no sorted, each number appear 1 time in each cell
    Cell F9-->21-22-23-24-25-26-27-28-29-30 <-some #s appear repeated with in the 3 cell e.g # 23, 25, 27 and 31 appear twice.
    Cell F10->04-03-02-01-31-32-33-34-35-36
    --------------------------------------------
    Cell F11->01-02-03-04-08-14-15-17-21-22-23-24-25-26-27-28-29-30-31-32-33-34-35-36 <-- here in cell F11 the 3 cell should
    appear merged, each number should appear 1 time and sorted..





    any help, recommendation on how to do'it is appreciated


    Thank you very much !!




    Best Regards

    David
    Last edited by david gonzalez; 10-21-2012 at 03:29 PM.

  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,938

    Re: How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numb

    if you are dealing with that many numbers, and want them sorted and have no duplicates, it would be far easier to work with if each number was entered into its own cell

    Cell F8-->08-31-25-15-27-29-36-14-17-23
    shoud be
    f8 08
    g8 31
    h8 25
    etc
    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
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numb

    Try this user defined function

    Please Login or Register  to view this content.


    Open the VBA editor by hitting Alt F11.
    Insert a new module with Insert - Module
    Paste in the above function
    Go back to the sheet by hitting Alt F11.

    In F11, enter = =GetSortedUniques(F8:F10)

    Remember to save the workbook as a macro enabled workbook .xlsm
    Martin

  4. #4
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numb

    Hi mr FDibbins

    unfortunately i can't enter a number on each cell, due that i have to perform the same task in daily basis, in many cells with different "set" of numbers is a lot...

    Thank you so much,

    actually i'm trying to figure it out a command that guru member (mr Mrice) nicely told me to copy with a macro..
    i'm having problem with the last part.

    when In cell F11, i enter = =GetSortedUniques(F8:F10)

    excel does't do nothing.. i still looking, might i'm missing a letter or something...



    thank you

    best regards

    David

    i

  5. #5
    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,938

    Re: How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numb

    ok then i will leave you in martin's very capable hands

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numb

    Different method

    UDF

    Use in cell like

    =SortUniq(A8:A10,"-")

    Please Login or Register  to view this content.

  7. #7
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numb

    Sorry - one too many equals signs.

    Just enter like a normal formula

    =GetSortedUniques(F8:F10)

  8. #8
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numb

    Here is a quick sort based approach. The UDF can be used in the formula

    =SortDelimitedString(F8&"-"&F9&"-"&F10, "-")
    Please Login or Register  to view this content.
    Last edited by mikerickson; 10-22-2012 at 03:42 AM.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  9. #9
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numb

    Thank you so much Mrice,

    wow, seems that while learn a lil, this excel thingui create an addiction.. lol..




    Best Regards from miami

    David.

  10. #10
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numb

    Thank you Mr mikerickson,

    i realised that in this forums are many wonderful person that share the expertise with others...


    Thank you very much,

    right now i'm trying to figure it out, on "how to search missing numbers" from a min/max library.."
    the problem i see is that the group of number are located in 1 single cell..

    i found and learn a bit on how to do it, but is not what i need because this particular method
    find a 1 number per single cell or multi array


    Thank you very much for your help !!



    Best Regards from Miami.

    David

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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