+ Reply to Thread
Results 1 to 4 of 4

Nested IFs formula to find matching values with multiple conditions

  1. #1
    Registered User
    Join Date
    03-24-2009
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Exclamation Nested IFs formula to find matching values with multiple conditions

    I'm trying to use a single Excel formula to perform a somewhat complex task.

    I have 2 columns of numbers, sorted from highest to lowest. Probably 70% of the numbers match each other side-by-side, because both are sorted the same way.

    The remainder do not match. I need a formula that will compare values in both columns, then do one of 3 things.

    The worksheet appears like so:
    (A) (B)
    21 21
    33 25
    90 33
    129 129
    130 140
    145 145

    1. If the column A value matches the column B value, output "match"

    2. If the column A value does not match the column B value, AND the column A value does not appear anywhere in column B, output "no match possible"

    3. If the column A value does not match the column B value, AND the column A value appears somewhere in column B, output "match elsewhere"

    I'm trying to do this using the IF statement and it's a miserable failure. Any ideas how I might tackle this?

    I'm an Excel newbie :-(
    Last edited by ghuang; 03-24-2009 at 11:27 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Question on complex formula??

    Welcome to the forum.

    Please take a few minutes to read the forum rules about thread titles, and then edit your post accordingly.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Question on complex formula??

    Hi

    Assuming that your data is in the range A1:B6, then enter the formula

    =IF(A1=B1,"Match",IF(COUNTIF($B$1:$B$6,A1)=0,"No Match Possible","Match Elsewhere"))
    in C1 and copy down to C6.

    rylo

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Nested IFs formula to find matching values with multiple conditions

    Place in C1:
    Please Login or Register  to view this content.
    Copy down to end of list.
    Last edited by ConneXionLost; 03-25-2009 at 02:04 AM.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

+ 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