+ Reply to Thread
Results 1 to 9 of 9

Multi Value Compare Function/Equation?

  1. #1
    Registered User
    Join Date
    08-14-2009
    Location
    No
    MS-Off Ver
    Excel 2003
    Posts
    20

    Multi Value Compare Function/Equation?

    Hi all,
    I have a data dump of values that I need to inspect to see if they're valid. I have a table of acceptable values in the same workbook that I want to use as a legend/answer key for the data dump.

    The attached screenshot gives you an idea of what I'm trying to do. For each row on the left side, I need to compare the Value 1, Value 2, and Value 3 entries with the Acceptable values on the right side.

    If all 3 values on the left line up with 1 row in the Acceptable Values table, the I write "OK" in the Results column. Otherwise I write "BAD!".

    The trick here is that the data dump is thousands of lines long, and the Acceptable Values table is about 110 rows long.

    Any ideas on how I can automate this lookup process by using a function or equation?
    Thanks!
    Attached Images Attached Images

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Multi Value Compare Function/Equation?

    please don't post images!
    Attached Images Attached Images
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-14-2009
    Location
    No
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Multi Value Compare Function/Equation?

    Quote Originally Posted by martindwilson View Post
    please don't post images!
    I believe it's clear that the image helps show the setup infinitely better than a page of text.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Multi Value Compare Function/Equation?

    nope it means someone has to replicate your work sheet to create a solution,my secretary just left

  5. #5
    Registered User
    Join Date
    08-14-2009
    Location
    No
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Multi Value Compare Function/Equation?

    Quote Originally Posted by martindwilson View Post
    nope it means someone has to replicate your work sheet to create a solution,my secretary just left
    Any idea when she's back?

    Should I attach the spreadsheet then too?

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Multi Value Compare Function/Equation?

    yep an attached workbook is always best

  7. #7
    Registered User
    Join Date
    08-14-2009
    Location
    No
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Multi Value Compare Function/Equation?

    If the columns are split, this works

    =IF(SUMPRODUCT((B2>=$F$2:$F$11)*(B2<=$G$2:$G$11)*($H$2:$H$11=C2)*($I$2:$I$11=D2))=1,"OK","BAD")


    Cool huh?

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Multi Value Compare Function/Equation?

    well done then !

  9. #9
    Registered User
    Join Date
    08-14-2009
    Location
    No
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Multi Value Compare Function/Equation?

    Quote Originally Posted by martindwilson View Post
    well done then !
    I knew you'd be happy!

+ 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