+ Reply to Thread
Results 1 to 6 of 6

use IF to return a truly blank cell

  1. #1
    Registered User
    Join Date
    01-13-2005
    Posts
    34

    use IF to return a truly blank cell

    I often use if statements to return empty cells, for example:

    =IF(a1=0,"ERROR","")

    The trailing "" returns an empty cell. The problem is, it is not TRULY empty. If I fill that formula down, I cannot, for example, jump from one "ERROR" cell to the next by hitting Ctrl arrow-down because it seems to think that these empty cells have contents.

    Is there a way to designate, in such a formula as above, to return a TRULY empty cell?

    Thanks

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    If you think logically, the cell is NOT empty, (truely or otherwise) as it contains a formula. What you are really doing is forcing the cell to not display its contents with IF(.....,"").

    AFAIK, there is no way to make a cell with a formula act as if it doesn't exist.

    One option to explore is to use Find. Highlight the column you want to search. Click CTRL+F. In the "Find What", enter the Error (#N/A, #VALUE, etc.). Then click on Options to search "By Columns" and set Look In to: Values.

    Not too bad, especially if you have a very long column to look through.

    HTH

    Bruce
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Registered User
    Join Date
    01-13-2005
    Posts
    34
    Yes but... I forgot to mention a key step I do. After running this IF formula I always copy and paste special the cells as values. So the formulas no longer exist. The "" is turned into nothingness that is not, truly, nothingness. The Find technique is great if you want to find and replace something within a given cell, but I want to find and merely TAG something (in an adjacent cell; hence using the formula)

  4. #4
    Dave Peterson
    Guest

    Re: use IF to return a truly blank cell

    Nope.

    If you don't need the formula, you could use this:

    =if(a1=0,"Error","deletethis")
    Drag down the column
    convert to values (edit|copy, edit|paste special|Values)

    Then edit|replace
    what: deletethis
    with: (leave blank)
    replace all.



    cwinters wrote:
    >
    > I often use if statements to return empty cells, for example:
    >
    > =IF(a1=0,"ERROR","")
    >
    > The trailing "" returns an empty cell. The problem is, it is not TRULY
    > empty. If I fill that formula down, I cannot, for example, jump from
    > one "ERROR" cell to the next by hitting Ctrl arrow-down because it
    > seems to think that these empty cells have contents.
    >
    > Is there a way to designate, in such a formula as above, to return a
    > TRULY empty cell?
    >
    > Thanks
    >
    > --
    > cwinters
    > ------------------------------------------------------------------------
    > cwinters's Profile: http://www.excelforum.com/member.php...o&userid=18386
    > View this thread: http://www.excelforum.com/showthread...hreadid=393270


    --

    Dave Peterson

  5. #5
    Gary's Student
    Guest

    RE: use IF to return a truly blank cell

    Use an event macro.

    If cell A1 changes and is zero then set the result cell to "ERROR"
    if cell A1 changes and is not zero then set the result cell to ""
    --
    Gary's Student


    "cwinters" wrote:

    >
    > I often use if statements to return empty cells, for example:
    >
    > =IF(a1=0,"ERROR","")
    >
    > The trailing "" returns an empty cell. The problem is, it is not TRULY
    > empty. If I fill that formula down, I cannot, for example, jump from
    > one "ERROR" cell to the next by hitting Ctrl arrow-down because it
    > seems to think that these empty cells have contents.
    >
    > Is there a way to designate, in such a formula as above, to return a
    > TRULY empty cell?
    >
    > Thanks
    >
    >
    > --
    > cwinters
    > ------------------------------------------------------------------------
    > cwinters's Profile: http://www.excelforum.com/member.php...o&userid=18386
    > View this thread: http://www.excelforum.com/showthread...hreadid=393270
    >
    >


  6. #6
    Dave Peterson
    Guest

    Re: use IF to return a truly blank cell

    After you convert to values, you can see that those "empty" cells aren't really
    empty.

    Tools|Options|Transition tab|check Transition navigation keys
    (remember to toggle it off later!)

    Now look at the formula bar for one of those empty cells--you'll see a single
    quote.

    I usually use a formula like:

    =if(a1=0,"ok",na())

    convert to values and then do that Edit|replace on the #n/a! string.

    (Kind of the same response as the deletethis message, huh?)

    cwinters wrote:
    >
    > Yes but... I forgot to mention a key step I do. After running this IF
    > formula I always copy and paste special the cells as values. So the
    > formulas no longer exist. The "" is turned into nothingness that is
    > not, truly, nothingness. The Find technique is great if you want to
    > find and replace something within a given cell, but I want to find and
    > merely TAG something (in an adjacent cell; hence using the formula)
    >
    > --
    > cwinters
    > ------------------------------------------------------------------------
    > cwinters's Profile: http://www.excelforum.com/member.php...o&userid=18386
    > View this thread: http://www.excelforum.com/showthread...hreadid=393270


    --

    Dave Peterson

+ 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