Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF / ISBLANK Missile Excel Discussion (Misc queries) 1 February 23rd 10 10:18 PM
IsBlank Mark Costello[_2_] Excel Discussion (Misc queries) 5 November 7th 08 12:11 PM
IF and ISBLANK projectnewbie Excel Worksheet Functions 4 July 30th 08 05:41 PM
ISBLANK Gimpy815 Excel Worksheet Functions 2 February 24th 06 06:09 PM
If(ISBLANK) Bill R Excel Worksheet Functions 1 August 13th 05 05:56 PM


All times are GMT +1. The time now is 03:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"