The information in this article applies to:
SUMMARY
In a Microsoft Excel macro, when you use a formula that contains an
R1C1 reference in a logical argument, the formula always returns the
value "FALSE".
The above statement should produce the result "TRUE" when the appropriate worksheet cell contains the value 2 and cause the RETURN() statement to stop the macro; however, it does not. The first argument to the IF() function must always be a logical statement. In a logical expression, "RC[1]" is interpreted as text, not as a cell reference, as desired. This statement literally tests whether the set of characters "RC[1]" is equivalent to the number 2, which will always be false. A text string such as "RC[1]" will be interpreted as a reference only when it is used in a function that expects a reference argument. Instead of using the above statement, use the following macro statement:
Additional query words:
Keywords : |
Last Reviewed: March 11, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |