I would like c1 to display b1/a1 if a1 and b1 not empty but would like c1 to
remain empty if nothing in a1 and b1
the following works but only if there is a value in a1 and b1.
=IF(AND(A1="", B1=""),"", B1/A1)
if a1 and b1 empty c1 shows hashkey value!
what am I doing wrong
Roger Govier - 24 Nov 2006 12:05 GMT
Hi
It sounds as though you have a space character in A1 or B1 or Both.
Do you have a formula in them which is set to return a Null if false?
If so, this formula may be incorrect. For example in A1
=IF(D5=50,5,"") may have been wrongly entered as =IF(D5=50,5," ")
You could amend your formula to
=IF(COUNT(A1:B1)<2,"",B1/A1)
which will work whether there are spaces or nulls in A1 and B1

Signature
Regards
Roger Govier
>I would like c1 to display b1/a1 if a1 and b1 not empty but would like
>c1 to
[quoted text clipped - 6 lines]
>
> what am I doing wrong
driller - 24 Nov 2006 17:29 GMT
"I would like c1 to display b1/a1"
=IF(AND(A1="",B1=""),"", B1/A1)
when b1=3, a1=5
1. do you want to literally display as "3/5" or
2. do you want to display the result value as 0.6. or
when b1 is blank, a1=5 (vice versa)
3. do you want to literally display as "/5" or
2. do you want to display the result as blank"".
this counter question is for philosophical understanding of your need.
> I would like c1 to display b1/a1 if a1 and b1 not empty but would like c1 to
> remain empty if nothing in a1 and b1
[quoted text clipped - 5 lines]
>
> what am I doing wrong