IF(ISBLANK(A1),...) vs IF(A1="",...)

Posted on 2012-09-07
Last Modified: 2012-09-07
I'm getting different results for these

say E1 contains a formula: =IF(D1="","","Leave blank")
If the user enters a value in D1, E1 should display "Leave blank", otherwise E1 should be empty/blank, as well

Farther out, R1 contains a formula: =IF(ISBLANK(E1),"b","v")  
(I'm using this scheme with COUNTIF() on about 10 cells on the same row, to see how many cells are blank, or have valid entries)

So, when I enter nothing in D1, and E1 is blank:
If R1 contains the formula: =IF(ISBLANK(E1),"b","v") , R1 displays "v", even though E1 looks to be blank
If R1 contains the formula: =IF(E1="","b","v")  R1 displays a "b", like it should

What am I doing wrong? Is blank not the same as empty? Does the formula itself count as "not blank"?

Question by:mlagrange
    LVL 8

    Accepted Solution

    Not sure this will help, but ISBLANK() is not the same as ="". ISBLANK() will only be TRUE if the field is truly blank, i.e. no formulas either. "" means there are no characters in the field, but if there were a formula there, it wouldn't matter.

    Does that make sense?

    Author Closing Comment

    Unfortunately, yes. I'm an Access guy, and I still can't explain the difference between blank, zero-length string, and null...


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
    Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
    This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
    This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now