+ Reply to Thread
Results 1 to 9 of 9

If statement to return blank if cell D1 is empty...

  1. #1
    Registered User
    Join Date
    11-11-2008
    Location
    Elsinore - Denmark
    Posts
    19

    If statement to return blank if cell D1 is empty...

    Hello.

    I have a problem with finding the right function. My goal is to have the following function...

    The cell D1 has the following function: [=IF(B1<=C1;"YES";"NO")] But I would like to have the cell D1 to be left blank, if the cell A1 is blank.
    How can I solve this Issue??
    Last edited by VBA Noob; 11-11-2008 at 05:07 PM.

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Formula

    Try this,

    [=IF(A1="","",IF(B1<=C1;"YES";"NO"))]

    Or

    HTML Code: 

  3. #3
    Registered User
    Join Date
    11-11-2008
    Location
    Elsinore - Denmark
    Posts
    19
    Quote Originally Posted by modytrane View Post
    Try this,

    [=IF(A1="","",IF(B1<=C1;"YES";"NO"))]

    Or

    HTML Code: 

    None of theese options are working...?

    I'm using Excel 2007, if that makes any difference..

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    What does not work?
    Do you get an eroor? Which one?

  5. #5
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Replace commas (,) with semi coloms (; ) in the formula or the contrary depending on your regional settings

  6. #6
    Registered User
    Join Date
    11-11-2008
    Location
    Elsinore - Denmark
    Posts
    19
    Quote Originally Posted by arthurbr View Post
    Replace commas (,) with semi coloms (; ) in the formula or the contrary depending on your regional settings
    It still dosen't work...

    It comes with an error saying 'error: invalid name'.

    NOTE! I have a danish version of Excel, so I'm translating tekst to english.

  7. #7
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    If statement formula

    I didn't even notice the semicolons.
    Try to use semicolons throughout.
    I see that your original formula had ; in the IF statement.
    In US we use , instead.
    It should work if you use either all ; OR all ,
    But you can't mix them.
    modytrane.

  8. #8
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    If Then formula

    look at the attached example.
    formulas are in column D
    modytrane
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-11-2008
    Location
    Elsinore - Denmark
    Posts
    19
    Quote Originally Posted by modytrane View Post
    look at the attached example.
    formulas are in column D
    modytrane
    As Beautiful as a spring sunrise :D

    Thank you so much!

    I was on the right path, but still nowhere near

    Thanks for your quick help. Now I can sleep tonight. Unlike last night, where I couldn't stop thinking about it

+ 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