Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF / ISBLANK | Excel Discussion (Misc queries) | |||
IsBlank | Excel Discussion (Misc queries) | |||
IF and ISBLANK | Excel Worksheet Functions | |||
ISBLANK | Excel Worksheet Functions | |||
If(ISBLANK) | Excel Worksheet Functions |