+ Reply to Thread
Results 1 to 9 of 9

If and isblank dilema

Hybrid View

  1. #1
    Registered User
    Join Date
    04-19-2013
    Location
    Nashivlle, Tennesse
    MS-Off Ver
    Excel 2007
    Posts
    4

    Unhappy If and isblank dilema

    Hello: I am trying to use the formula below, however, it keep returning mismatch in the cell when it shouldn't. Please let me know what I'm doing wrong. Thanks

    =IF(AND(A2=B2,ISBLANK(A2))," ","Mismatch")

    3/14/2013 1/1/1901 Mismatch
    3/22/2013 1/1/1901 Mismatch
    3/21/2013 1/1/1901 Mismatch
    3/8/2013 1/1/1901 Mismatch
    3/9/2013 1/1/1901 Mismatch
    3/12/2013 1/1/1901 Mismatch
    3/12/2013 1/1/1901 Mismatch
    3/7/2013 1/1/1901 Mismatch
    1/1/1901 Mismatch
    1/1/1901 Mismatch
    3/7/2013 3/7/2013 Mismatch

  2. #2
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: If and isblank dilema

    Hello,

    Can you provide your expected result?
    From what I can interpret from your IF formula, it says "If Value on Cell A2 = Value on B2, AND A2 is blank, return " ", if both of them NOT happen at the same time, return "Mismatch") and thus, your formula is working.
    Perhaps you wanted it to be
    =IF(OR(A2=B2,ISBLANK(A2))," ","Mismatch")
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  3. #3
    Registered User
    Join Date
    04-19-2013
    Location
    Nashivlle, Tennesse
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: If and isblank dilema

    Hello:

    Thanks for responding. What I am trying to achieve is If cell A and B are equal then leave cell c blank, If cell A is blank then leave cell c blank, otherwise put mismatch in cell C. If you notice, the last three lines should be blank.

  4. #4
    Registered User
    Join Date
    04-19-2013
    Location
    Nashivlle, Tennesse
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: If and isblank dilema

    I've tried this as well and it keeps giving mismatch in all fields.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: If and isblank dilema

    Agree with Lemice, based on what your formula is evaluating, it is returning the correct answer.

    Maybe your logic is faulty? What are you trying to achieve?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: If and isblank dilema

    Hi

    I think this formula is what you are after:

    =IF(OR(A11=B11,ISBLANK(A11)),"","Mismatch")
    However I don't think that you need the isblank.


    So this would work too
    .
    =IF(A11=B11,"","Mismatch")

  7. #7
    Registered User
    Join Date
    04-19-2013
    Location
    Nashivlle, Tennesse
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: If and isblank dilema

    Hi Thanks for responding. I tried that however if A2 is blank and B2 has a date, then it will list as mismatch; I don't want that. I want the cells that equal and the blank cells in A2 to return a blank value.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: If and isblank dilema

    explain exactly what you are trying to achieve?

  9. #9
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: If and isblank dilema

    I see, then this formula might be the one you are looking for
    =IF(A2=B2,"",IF(AND(NOT(ISBLANK(B2)),ISBLANK(A2)),"","Mismatch"))
    Paste it on C2 and drag it down.
    This will give "blank" result if Cell A2 = Cell B2, OR A2 blank and B2 not blank (in case both cells are blank, they are equal).
    This will give "Mismatch" in all other cases, including the case A2 not blank but B2 blank.

+ 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