ISBLANK or NOT

A

aileen

I need to check if a cell is blank and return one letter, but if the cell is
not blank I need it to return another letter if true and a different letter
if false. I am using the following statement but I am getting a run-time
error, Application-defined or object-defined error. Would someone please let
me know what I am doing wrong?

ActiveCell.FormulaR1C1 =
"=IF(Or(ISBLANK(RC[-12])=TRUE,""f""),(RC[-12]=""CALL"",""c"",""p""))"

Thanks for any help
 
T

Tom Hutchins

Your syntax is definitely wrong, although it's not clear to me what your
formula is supposed to return. Is the following what you wanted?

ActiveCell.FormulaR1C1 =
"=IF(ISBLANK(RC[-12])=TRUE,""f"",IF(RC[-12]=""CALL"",""c"",""p""))"

If RC[-12] is blank, f is returned. If it equals CALL, c is returned.
Otherwise, p is returned. If that's not what you intended, let me know.

Hope this helps,

Hutch
 
A

aileen

That worked perfectly. Thanks so much.

Tom Hutchins said:
Your syntax is definitely wrong, although it's not clear to me what your
formula is supposed to return. Is the following what you wanted?

ActiveCell.FormulaR1C1 =
"=IF(ISBLANK(RC[-12])=TRUE,""f"",IF(RC[-12]=""CALL"",""c"",""p""))"

If RC[-12] is blank, f is returned. If it equals CALL, c is returned.
Otherwise, p is returned. If that's not what you intended, let me know.

Hope this helps,

Hutch

aileen said:
I need to check if a cell is blank and return one letter, but if the cell is
not blank I need it to return another letter if true and a different letter
if false. I am using the following statement but I am getting a run-time
error, Application-defined or object-defined error. Would someone please let
me know what I am doing wrong?

ActiveCell.FormulaR1C1 =
"=IF(Or(ISBLANK(RC[-12])=TRUE,""f""),(RC[-12]=""CALL"",""c"",""p""))"

Thanks for any help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top