+ Reply to Thread
Results 1 to 7 of 7

Ignore empty cells in an IF formula

  1. #1
    Registered User
    Join Date
    04-28-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    50

    Ignore empty cells in an IF formula

    Hi All,
    Attached is a simplified worksheet that I'm having trouble with. Basicly I want to know if it possible for excel to ignore blank cells in an IF formula?
    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Ignore empty cells in an IF formula

    Try

    =IF(AND(D1="",F1="",),0,IF(D1>F1,4,IF(D1=F1,2,0)))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    04-28-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Ignore empty cells in an IF formula

    Thanks for your help Ace but I'm still getting an answer of 2 when i remove the numbers in D1 & F1

  4. #4
    Registered User
    Join Date
    04-28-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Ignore empty cells in an IF formula

    Oops resent same message.
    Last edited by moppyau; 07-09-2013 at 05:57 AM. Reason: Duplicate post

  5. #5
    Forum Contributor
    Join Date
    06-26-2013
    Location
    LAX
    MS-Off Ver
    Excel 2007,Excel 2010
    Posts
    363

    Re: Ignore empty cells in an IF formula

    Hi..

    Try this.

    =IF(OR(D1="",F1=""),0,IF(AND(D1="",F1="",),0,IF(D1>F1,4,IF(D1=F1,2,0))))

  6. #6
    Forum Contributor
    Join Date
    06-26-2013
    Location
    LAX
    MS-Off Ver
    Excel 2007,Excel 2010
    Posts
    363

    Re: Ignore empty cells in an IF formula

    Sorry forgot to delete the repetition. This itself should work

    =IF(OR(D1="",F1="",),0,IF(D1>F1,4,IF(D1=F1,2,0)))

  7. #7
    Registered User
    Join Date
    04-28-2013
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    50

    Re: Ignore empty cells in an IF formula

    Thanks elay that works a treat.

+ 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