+ Reply to Thread
Results 1 to 5 of 5

Check if part of a column contains multiple values

  1. #1
    Registered User
    Join Date
    04-20-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2013, 2010, 2007, 2003
    Posts
    99

    Check if part of a column contains multiple values

    Hi All, I'm looking to isolate cases where 2 values from column B are present within their own grouping as determined by column A. That sounds wordy but I believe this will clarify:

    A B
    1 Adam
    1 Ben
    1 Chris
    1 Dave
    1 Evan
    2 Frank
    2 Gary
    2 Henry
    2 Irene
    2 Jon

    What I would like to know is within the 1's if Adam and Chris are together (they are, and they shouldn't be) and either highlight their names or put an "x" next to them or something along those lines. Then I want to check if within the 2's if Adam and Henry are together (they are not, and they shouldn't be)... and so on.

    Any help would be greatly appreciated.

    Thank you!

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: Check if part of a column contains multiple values

    What do you mean "Adam and Chris are together"? Do you mean if they are next to each other in the cells? Also, how should I know if I am looking for "Adam and Chris" and not "Ben and Dave" Is this information stored somewhere?

  3. #3
    Registered User
    Join Date
    04-20-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2013, 2010, 2007, 2003
    Posts
    99

    Re: Check if part of a column contains multiple values

    By "Adam and Chris are together" I mean that they are in group 1, i.e. they share a common value in column A. The relative location in column B is not important.
    "Adam and Chris" vs. "Ben and Dave" vs. any other combination of 2 would be done on an ad hoc basis, this could be typed into the formula as needed or referenced in another cell. I've attached a sample which should help (probably should have done this in the first place...)

    Group_check.xlsx

    Thank you!

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Check if part of a column contains multiple values

    Hi

    One way to do this, is using IF & SUMPRODUCT formulae.

    Please Login or Register  to view this content.
    In first example, in L4, put this formula and copy down.

    Is this, OK, for you?
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Registered User
    Join Date
    04-20-2012
    Location
    New York, NY
    MS-Off Ver
    Excel 2013, 2010, 2007, 2003
    Posts
    99

    Re: Check if part of a column contains multiple values

    This is PERFECT, thank you!

+ 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