+ Reply to Thread
Results 1 to 6 of 6

Excel IF Statement with ISBLANK

  1. #1
    Registered User
    Join Date
    10-28-2015
    Location
    South Carolina
    MS-Off Ver
    2016
    Posts
    3

    Excel IF Statement with ISBLANK

    Ok, After an hour I am tired of messing with it and I figure someone can show me what silly error I am making

    Using this for a football database of scores

    A1 contains Team A Score
    B1 contains Team B Score

    What I want is
    A> B then "WIN"
    A<B then "Loss"
    A=B then "Tie"
    A is empty or missing the score then I do not want anything at all in the cell.

    I have this working for WINS LOSS TIES

    =IF(A1=B1,"Tie",IF(A1>B1,"Win",IF(A1<B1,"Loss")))

    but it shows the empty cells as TIES also.

    I know I need a ISBLANK but I have no idea where to insert.

    The formula needs to be
    IF A1 is blank then skip if A1 has a value then then do this =IF(A1=B1,"Tie",IF(A1>B1,"Win",IF(A1<B1,"Loss")))


    Thanks

  2. #2
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Excel IF Statement with ISBLANK

    Quote Originally Posted by DNPSC View Post
    What I want is
    A> B then "WIN"
    A<B then "Loss"
    A=B then "Tie"
    A is empty or missing the score then I do not want anything at all in the cell.
    I would not use ISBLANK. Ostensibly:

    =IF(OR(A1="",B1=""),"",IF(A1<B1,"Loss",IF(A1=B1,"Tie","Win")))

    Note that it is not necessary to test all 3 conditions, since the last condition is implied by the failure of the first two.

    Alternatively:

    =IF(OR(A1="",B1=""),"",CHOOSE(SIGN(A1-B1)+2,"Loss","Tie","Win"))

    ISBLANK is TRUE only when the cell is empty; that is, no value and no formula. But as the formula above demonstrates, a cell can look empty, but in fact it contains a formula. In that case, ISBLANK returns FALSE. Testing A1="" covers both situations.
    Last edited by joeu2004; 10-28-2015 at 07:13 PM. Reason: minor typos

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Excel IF Statement with ISBLANK

    Try this.
    Please Login or Register  to view this content.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  4. #4
    Registered User
    Join Date
    10-28-2015
    Location
    South Carolina
    MS-Off Ver
    2016
    Posts
    3

    Re: Excel IF Statement with ISBLANK

    A THOUSAND Thank Yous. Both formulas worked well and I am now returning the needed results.

    Thanks

  5. #5
    Registered User
    Join Date
    10-28-2015
    Location
    South Carolina
    MS-Off Ver
    2016
    Posts
    3

    Re: Excel IF Statement with ISBLANK

    Second half of the question just popped up.

    I am using a VLOOKUP to reference scores from a second sheet with the workbook

    This formula works perfectly EXCEPT when I am missing the score and then it returns a ZERO instead of leaving the cell blank
    =VLOOKUP(A1,'1996results'!A:F,2,FALSE)


    What I am looking for is a formula that returns nothing/leaves the cell blank instead of placing a ZERO in the cell.

    Thanks once again !!!!

  6. #6
    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
    52,946

    Re: Excel IF Statement with ISBLANK

    If you mean that A1 is empty/blank, then perhaps...
    =if(A1="","",VLOOKUP(A1,'1996results'!A:F,2,FALSE))
    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

+ 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] Nested if(isblank) statement
    By Groovicles in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-13-2013, 09:50 AM
  2. Using OR and ISBLANK in an IF Statement
    By amwbogan1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-24-2013, 09:43 AM
  3. [SOLVED] using isblank and isna in one statement
    By cherryt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-14-2013, 04:44 AM
  4. IF Statement with ISBLANK function?
    By Lmsloman in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-21-2013, 06:14 PM
  5. [SOLVED] Nested If Statement - ISBLANK and ISNA in same statement?
    By Janc in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-23-2013, 09:00 AM
  6. ISBLANK statement returning multiple strings
    By Sam Davis in forum Excel General
    Replies: 10
    Last Post: 05-05-2010, 05:23 PM
  7. IF ISBlank statement
    By orange86 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-06-2008, 11:50 AM
  8. Adding A Not(IsBlank) To IF Statement(help)
    By getmhawks in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-12-2006, 05:50 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