Seems like:
=IF(ISNUMBER(R8C15),IF(R8C15 > 0, R8C15/R1C17,Null),Null)
Should return Null if R8C15 contains "xxx".
But it returns "#NAME?" instead.
Can anybody see what I'm doing wrong?
(I'm pushing that "IF" statement into the cell's .FormulaR1C1 via VBA
code)
PeteCresswell - 11 Jul 2007 14:41 GMT
> Seems like:
>
[quoted text clipped - 8 lines]
> (I'm pushing that "IF" statement into the cell's .FormulaR1C1 via VBA
> code)
PS: It returns the expected ".1" if R1C17=10 and R8C15=1
Ron Rosenfeld - 11 Jul 2007 14:57 GMT
>Seems like:
>
[quoted text clipped - 8 lines]
>(I'm pushing that "IF" statement into the cell's .FormulaR1C1 via VBA
>code)
Null is not a keyword. It needs to be in quotes.
=IF(ISNUMBER(R8C15),IF(R8C15 > 0, R8C15/R1C17,"Null"),"Null")
--ron
Dave Peterson - 11 Jul 2007 16:26 GMT
or maybe you wanted an empty string returned so the cell looked blank.
=IF(ISNUMBER(R8C15),IF(R8C15 > 0, R8C15/R1C17,""),"")
But don't expect that cell to be really empty--it has a formula in it.
> Seems like:
>
[quoted text clipped - 8 lines]
> (I'm pushing that "IF" statement into the cell's .FormulaR1C1 via VBA
> code)

Signature
Dave Peterson
PeteCresswell - 11 Jul 2007 19:35 GMT
> or maybe you wanted an empty string returned so the cell looked blank.
That's probably what I should be doing anyhow...
Thanks Ron.
Thanks Dave.