+ Reply to Thread
Results 1 to 9 of 9

Simple Match/Mismatch Formula

  1. #1
    Registered User
    Join Date
    12-22-2017
    Location
    Detroit, MI
    MS-Off Ver
    2016
    Posts
    19

    Simple Match/Mismatch Formula

    All,

    I have a very simple request that I can't seem to figure out myself. I have attached the Excel spreadsheet to make the request easier to understand.

    I have a spreadsheet with 5 columns where I'm comparing the values of Columns A & B to Columns C through E. If the values in Columns A & B are not present in Columns C through E, then Column F should output "Mismatch". If values in Columns A & B match values in Columns C through E, then Column F outputs "Match".


    I appreciate all the help!
    Attached Files Attached Files
    Last edited by ronakpatel; 04-21-2020 at 01:01 PM. Reason: solved

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Simple Match/Mismatch Formula

    you can use a countif()
    BUT i dont understand the mismatch in the example
    ROW 4
    why a mismatch - A4 = C4
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    12-22-2017
    Location
    Detroit, MI
    MS-Off Ver
    2016
    Posts
    19

    Re: Simple Match/Mismatch Formula

    Hi etaf,

    In row 4, the code in Column B does not match anything in columns C through E, therefore it's supposed to output "MISMATCH"

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Simple Match/Mismatch Formula

    OK, Got it

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Simple Match/Mismatch Formula

    what about blank cells in A or B
    If there is no blank in C to E is that a mismatch ?
    ROW 6
    or do we ignore blanks
    =AND(IF(A2="",1,COUNTIF(C2:E2,A2)>0),IF(B2="",1,COUNTIF(C2:E2,B2)>0))

  6. #6
    Registered User
    Join Date
    12-22-2017
    Location
    Detroit, MI
    MS-Off Ver
    2016
    Posts
    19

    Re: Simple Match/Mismatch Formula

    No, row 6 is a match. If there are values present in either Column A or Column B, then they must also be present in Columns C through E for the row to be a match. Any blanks in Row A or B can be ignored.

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Simple Match/Mismatch Formula

    so this should work
    =AND(IF(A2="",1,COUNTIF(C2:E2,A2)>0),IF(B2="",1,COUNTIF(C2:E2,B2)>0))

    =if( AND(IF(A2="",1,COUNTIF(C2:E2,A2)>0),IF(B2="",1,COUNTIF(C2:E2,B2)>0)), "match", "mismatch")

    i suspect an easier way, will see

  8. #8
    Registered User
    Join Date
    12-22-2017
    Location
    Detroit, MI
    MS-Off Ver
    2016
    Posts
    19

    Re: Simple Match/Mismatch Formula

    Thank you etaf. That formula works very well!

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Simple Match/Mismatch Formula

    you are welcome

+ 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. [SOLVED] Need help with 1 simple Index Match formula.
    By lorenc1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-19-2017, 09:36 AM
  2. Simple function mismatch?
    By mreFF in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-14-2014, 10:54 AM
  3. array match formula fails but simple match works
    By dimwit in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-06-2014, 07:30 PM
  4. [SOLVED] simple MATCH formula fails on array
    By djarum11 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-02-2014, 06:27 AM
  5. Excel 2007 : Match & MisMatch Formula for 3 criteria
    By xcruc1at3r in forum Excel General
    Replies: 0
    Last Post: 02-08-2012, 04:22 PM
  6. Simple Problem - Type Mismatch
    By rokuk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-16-2007, 10:35 PM
  7. simple: type mismatch
    By mark kubicki in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2006, 03:10 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