If Statement help, please
Well, you're right. It certainly did do the trick. And thanks for
explaining it. There's no way I would get as good an explaination from the
Help menu!
--
smither fan
"David Biddulph" wrote:
Well, you'd already demonstrated that A1+B1 was doing the arithmetic and
being calculated as zero, so when you compared it with the empty string ""
it failed the test. [You can check the result of the comparison and see
that =(0="") returns FALSE.]
If you wanted to use the string comparison, you could have used as the input
the result of a string concatenation instead of an arithmetic addition, and
hence you could have used =IF(A1&B1="","",A1+B1)
That, however, still wouldn't have worked if one or both of your input cells
had not been empty but, for example, contained a space " ", so the COUNT
recommendation is a better bet.
--
David Biddulph
"Ross" wrote in message
...
Thanks Dave. Can you please tell me why my original one didn't work?
"Dave Peterson" wrote:
I'd use:
=if(count(a1,b1)=2,a1+b1,"")
Ross wrote:
Hi all
I have what seemed to me to be a simple task: If both A1 and
B1 have nothing in them, show nothing, but if either cell has something
in
it, do the math...A1+B1. So I wrote: if(A1+B1="","",A1+B1).
Unfortunately,
it'll do the math, but it shows a zero for the rows that have no input.
Can
someone help?? And explain why??
|