+ Reply to Thread
Results 1 to 7 of 7

Compare multiple values

  1. #1
    Registered User
    Join Date
    01-20-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    33

    Exclamation Compare multiple values

    I have included a sample attachment of what i am attempting to do. I found similar solutions on Google but i dont totally understand the syntax.
    I am trying to compare two cells . . . if equal . . . compare two other cells.
    If the first pair are not equal, then vlookup B1
    If the 1st is equal but the 2nd isn't, vlookup B1
    If both are equal then do nothing.

    Has anyone ever encountered this issue?

    Thanks!

    Ran
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Compare multiple values

    The VLOOKUPs appear identical - in which case perhaps simply:

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: Compare multiple values

    my stab is you need this

    =IF(AND(C8=I8,E8=K8),"",IF(OR(C8=I8,E8<>K8),VLOOKUP($B$1,StyleDetail!$A$1:$BF$65536,33,FALSE),IF(C8<>I8,VLOOKUP($B$1,StyleDetail!$A$1:$BF$65536,33,FALSE))))

    maybe the second and third if swapped around, untested though
    Last edited by scottylad2; 11-10-2010 at 03:20 PM. Reason: second thought
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  4. #4
    Registered User
    Join Date
    01-20-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    33

    Exclamation Re: Compare multiple values

    Thanks for the replay Don! you help is always a plus. However . . . perhaps i didnt explain my situation as well i i thought. LOL
    I corrected my "TEST3" . . . hopefully i have a good explination.



    Thanks so much!
    Attached Files Attached Files

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Compare multiple values

    I confess I don't see how the prior suggestion needs to alter - the formula suggested simply states if either result pair does not match perform the VLOOKUP outlined.
    (other than the fact you intend to double evaluate the VLOOKUP re: blanks)

  6. #6
    Registered User
    Join Date
    01-20-2009
    Location
    Alabama
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Compare multiple values

    Thanks Don. Last night i was working on this issue at home and this is what i came up with . . . . .
    IF(G8&H8=VLOOKUP($C$1,StyleDetail!$A:$BF,31,FALSE)&VLOOKUP($C$1,StyleDetail!$A:$BF,32,FALSE),"",VLOOKUP($C$1,StyleDetail!$A:$BF,31,FALSE))

    Do you forsee any problems with this solution. All it does is combine G8 & D8 for a unique number . . . the combines two vloookup's . . . . is the two dont match it the performs an additional vlookup.


    Thanks again Don.
    As usual, i saved you suggestions and formula for future reference.

    C90RanMan

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Compare multiple values

    The above bears little resemblance to the layout of the sample file so I can't really pass comment at this stage.

    All I was stating previously was that you need only compare the result pairs - if either failed to match perform the VLOOKUP else return Null.

    At this point I don't really have much of an idea of what is going on I'm afraid...

+ 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