+ Reply to Thread
Results 1 to 15 of 15

Finding unique groups of values in columns

  1. #1
    Registered User
    Join Date
    12-17-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Finding unique groups of values in columns

    Hi,

    I have a file with immunophenotypic markers and their relationship to certain blood cells.

    What I need to do is search the list and pull out the groups of defining markers for each blood cell. Some of the cells have many markers, some only have one but I need to find which combinations of markers identify each cell if possible.

    I have attached the file (I think!)

    Thanks,

    Colm O'Shea
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Finding unique groups of values in columns

    Need some more description about how to match it and expected result. Without the clear info it is very hard to assume your expected result


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    12-17-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Finding unique groups of values in columns

    Sorry,

    I am hoping to extract groups of the markers which identify each cell.

    e.g. for T cells, the combination of CD3, CD7 and BCL-2 can only be T cells and not any other cell that may show each of those markers or a combination of two of them.

    For some cells, there would be a number of combinations and for others, there will be no differentiating marker.

    Not sure if that helps, but any assistance would be great as I'm struggling to pull them out with lookup, etc.

    Colm

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Finding unique groups of values in columns

    Won't be quick but I think it works... I aimed for if there was more than one unique combination then provide the shortest one.

    It's a macro but I can't imagine this being very easy to do with functions. Press Alt+F11 to open vba editor, click insert-> module then copy and paste below text and f5 to run. On the example you provide probably looking at around 30 minutes to 1 hour. If you have a bigger "real" dataset it will get exponentially worse the bigger the dataset gets. I don't really see how you can do it other than testing every possible variation of markers.
    Please Login or Register  to view this content.
    Edit, just saw your post with further explanation... for the T-cells, CD3 on it's own is unique (it only exists in T-cells), so any combination involving CD3 from the available T-cells would also be unique, what do you want as the result here?
    Last edited by ragulduy; 12-17-2013 at 07:18 AM.

  5. #5
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,290

    Re: Finding unique groups of values in columns

    Or take a look at this.
    Change the layout a little
    Search cel in A1 en use button 'filter on'
    Attached Files Attached Files
    Last edited by popipipo; 12-17-2013 at 08:03 AM. Reason: update attachment
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  6. #6
    Registered User
    Join Date
    12-17-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Finding unique groups of values in columns

    Essentially, I'll need to either have a list of each combination for each cell or each of the differentiating markers (say CD3 for T cells) with the common markers associated with it.

    The problem is the variety of possible responses. The cell in question could have only one marker that differentiates it, or just one combination that separates it or it may not have any distinguishing markers.

    Once I have some form of separation, I can work with that. If it's possible to list each possible combination, that would be most useful.

    Thanks for your help. It's really helping me out!

    Colm

  7. #7
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,290

    Re: Finding unique groups of values in columns

    made a update of the attachment.

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Finding unique groups of values in columns

    Maybe something like this but there will be loads of combinations for some of them...
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    12-17-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Finding unique groups of values in columns

    Wow.

    Thanks a million!

    Colm

  10. #10
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,290

    Re: Finding unique groups of values in columns

    Wow.
    Wich solution?

  11. #11
    Registered User
    Join Date
    12-17-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Finding unique groups of values in columns

    Both are great as I now have a list of combos and I can filter them manually to have a look at similar groups (which is so handy as I now need to find a way of separating them outside of their markers).

    I was talking about yours with the Wow though as I hadn't seen yudlugar's macro at the time.

    You fellas are wizards, tbh.

  12. #12
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,290

    Re: Finding unique groups of values in columns

    If you are using mine check the 'x' whether they are in the right place!!
    I found a mistake somewhere.

  13. #13
    Registered User
    Join Date
    12-17-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Finding unique groups of values in columns

    Hi again popipipo,

    There's something amiss with the table or with the user!

    e.g. The B cells should have a number of markers specific only to them (CD19, CD20, PAX-5) but when it filters, it shows nothing.

    There are a number of similar cell-marker relationships not showing up.
    Am I doing something wrong here?

  14. #14
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,290

    Re: Finding unique groups of values in columns

    I found a mistake somewhere.
    That is what i said


    Try this one
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    12-17-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Finding unique groups of values in columns

    That really is a great help.

    Thank you so much.

    Colm

+ 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. Need forumla to sum number of unique values in groups of different sizes
    By ea2146 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-30-2013, 02:33 PM
  2. Finding Unique Values in two columns
    By pmfresno in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2012, 09:05 AM
  3. Finding Unique Between 2 Columns
    By Andrew.Trevayne in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-06-2011, 10:37 AM
  4. Sorting two groups of columns and finding missing data from each
    By mchudnvosky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-30-2010, 10:55 AM
  5. Finding Unique Values across four columns.
    By barksmith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2009, 02: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