View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default empty cell as a result of IF formula

"Jeremy BZH" wrote:
i need to use this cell with the formula result ("") for another
calculation
with SUM(), but this result is #VALUE!,at the same time time, i use it for
a
Count() formula and it works (it doesnt count it).
can i use something else than "" that will work both with SUM and COUNT ?


SUM and COUNT ignore cells that have text (notably "") as well as empty
cells. And apparently, that is sufficient to solve your problem.

But for future reference, another feature to put into your bag of tricks is
the N() function. For example:

=n(A1)*n(A2) - n(A3)

can be used if A1, A2 and/or A3 might be "". N() returns zero if the
argument is text, or the number if the argument is numeric.

FYI, the only way I know to get Excel 2003 offline help information on the
N() function is to enter "text and data functions" (without quotes), click
on T worksheet function, then click on See Also.


----- original message -----

"Jeremy BZH" wrote in message
...

i need to use this cell with the formula result ("") for another
calculation
with SUM(), but this result is #VALUE!,at the same time time, i use it for
a
Count() formula and it works (it doesnt count it).
can i use something else than "" that will work both with SUM and COUNT ?


"JoeU2004" wrote:

"Jeremy BZH" <Jeremy wrote:
i need to obtain an empty cell as a result of a "IF" formula, i usually
use
=if(logical test;"";value_if_false)
but i cannot use this result in a SUM formula


Perhaps you want:

=if(condition, "", SUM(range))

Note that this does not result in an "empty cell" per se. In particular,
if
that formula is in A1 and it results in "", ISBLANK(A1) will be false(!).

A formula can only result in the null string, which makes the cell
__appear__ empty or blank. You can detect truly empy (no formula or
constant) or null string by testing A1="".