+ Reply to Thread
Results 1 to 5 of 5

Making a Cell Blank

  1. #1
    Registered User
    Join Date
    05-02-2008
    Posts
    18

    Making a Cell Blank

    Hello,

    I have come across a problem with IFs.

    =IF(B4="hello","","Is it not hello")
    How can I make the cell contain nothing, because I think "" is still classed as something and
    ISBLANK()
    will return FALSE if that cell is tested.

    So is there something I can put in the IF statement to say "leave this cell completely empty"?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    =ISBLANK() will of necessity return FALSE since there is something in B4, i.e. a formula.

    Xl clearly regards a formula which returns "" (double quotes) as being Text, since the =ISTEXT(B4) returns TRUE, whilst =ISNUMBER(B4) returns false.

    Interestingly though, if you get VBA to populate the cell with double quotes:

    Please Login or Register  to view this content.
    it does return the null value you're after. It seems the proverbial sledgehammer/nut solution, but about the only thing I can suggest is have B4 be the subject of a Worksheet_SelectionChange event and put Your IF test in there.

    HTH

  3. #3
    Registered User
    Join Date
    05-02-2008
    Posts
    18
    Thanks for that

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    just out of interest why do you need a truly empty cell?

  5. #5
    Registered User
    Join Date
    05-02-2008
    Posts
    18
    I just wondered if there was a way to get it completely blank rather than making it a string with no contents.

+ 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