ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ISBLANK or NOT (https://www.excelbanter.com/excel-programming/418593-isblank-not.html)

aileen

ISBLANK or NOT
 
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

Tom Hutchins

ISBLANK or NOT
 
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" wrote:

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


aileen

ISBLANK or NOT
 
That worked perfectly. Thanks so much.

"Tom Hutchins" wrote:

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" wrote:

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



All times are GMT +1. The time now is 03:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com