+ Reply to Thread
Results 1 to 5 of 5

Seeking an alternative to blank ("") cell in IF arguments

Hybrid View

  1. #1
    KG
    Guest

    Seeking an alternative to blank ("") cell in IF arguments

    I usually find it convenient to use "" in formulas such as the following:

    =IF(B12>0,B12/C4,"")

    The problem of course is that an error will be returned if the cell left
    blank with "" is used in subsequent calculations. Is there an alternative to
    using zero instead of "" that still makes it obvious that the cell is
    intentionally left unpopulated but that does not result in #VALUE# errors?

  2. #2
    Bill Martin -- (Remove NOSPAM from address)
    Guest

    Re: Seeking an alternative to blank ("") cell in IF arguments

    KG wrote:
    > I usually find it convenient to use "" in formulas such as the following:
    >
    > =IF(B12>0,B12/C4,"")
    >
    > The problem of course is that an error will be returned if the cell left
    > blank with "" is used in subsequent calculations. Is there an alternative to
    > using zero instead of "" that still makes it obvious that the cell is
    > intentionally left unpopulated but that does not result in #VALUE# errors?


    ------------------------

    That's what the function NA() is designed to do. When any cell
    references it, that cell will also display #NA meaning that a value is
    not available.

    Bill

  3. #3
    Forum Contributor
    Join Date
    02-26-2005
    Posts
    175
    Quote Originally Posted by KG
    I usually find it convenient to use "" in formulas such as the following:

    =IF(B12>0,B12/C4,"")

    The problem of course is that an error will be returned if the cell left
    blank with "" is used in subsequent calculations. Is there an alternative to
    using zero instead of "" that still makes it obvious that the cell is
    intentionally left unpopulated but that does not result in #VALUE# errors?
    Hi,
    You could use a - 0 - instead of - "" -
    =IF(B12>0,B12/C4,0)
    then use Conditional Formating, for when the cell has a - 0 - the font would be white.
    That way you would not see it and your other calculations would be ok.
    Thx
    Dave

  4. #4
    Dave Peterson
    Guest

    Re: Seeking an alternative to blank ("") cell in IF arguments

    And it could be simpler to adjust the subsequent formula:

    =e1+e2+e3+e4

    could be changed to
    =sum(e1:e4)
    or
    =N(E1)+N(E2)+N(E3)+N(E4)

    And if it was ok to hide all the 0's--even those that return 0 in the formula,
    you could a custom format of something like:
    General;-General;;

    As well as the Format|Conditional formatting that Piranha suggested.



    KG wrote:
    >
    > I usually find it convenient to use "" in formulas such as the following:
    >
    > =IF(B12>0,B12/C4,"")
    >
    > The problem of course is that an error will be returned if the cell left
    > blank with "" is used in subsequent calculations. Is there an alternative to
    > using zero instead of "" that still makes it obvious that the cell is
    > intentionally left unpopulated but that does not result in #VALUE# errors?


    --

    Dave Peterson

  5. #5
    Jay
    Guest

    Re: Seeking an alternative to blank ("") cell in IF arguments

    > I usually find it convenient to use "" in formulas such as the
    > following:
    >
    > =IF(B12>0,B12/C4,"")
    >
    > The problem of course is that an error will be returned if the cell
    > left blank with "" is used in subsequent calculations. Is there an
    > alternative to using zero instead of "" that still makes it obvious
    > that the cell is intentionally left unpopulated but that does not
    > result in #VALUE# errors?


    A key question is, "how is the subsequent calculation supposed to treat the
    cell?" If you want the cell to be treated as zero, my advice is to have the
    cell's formula evaluate to zero. If you don't want zero displayed there,
    then use either custom formatting or conditional formatting or
    Tools >> Options >> View >> (uncheck) Zero values
    to make Excel display what you want.

+ 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