Microsoft KB Archive/51553

{| = Excel: Using R1C1 References as Text in a SELECT Statement =
 * width="100%"|

Last reviewed: April 3, 1997

Article ID: Q51553 1.50 2.20 3.00 MACINTOSH macrosheet

SUMMARY
The following information details how to use R1C1 references as text in the SELECT statement:

R1C1 Style References
Cell references passed as arguments to the SELECT statement can be parsed to actual references at either macro creation time or macro run time. To hold a cell reference in its unparsed state, it must be surrounded by double quotation marks. This type of reference can be used when the macro sheet is in either A1 or R1C1 notation. For an example of R1C1 as a cell reference, query on the following words:

R1C1 and reference and relative

&quot;R1C1&quot;
This is an absolute reference to the active cell on the active worksheet. Using the pair of quotation marks (&quot;&quot;) in place of the exclamation mark (!) prevents this reference from being parsed until macro run time. This type of cell reference operates in the same manner as !R1C1 does as a cell reference.

&quot;R[#]C[#]&quot;
This is a relative reference to a cell on the active sheet; it is not similar to the !R[#]C[#] reference type, which is described in a separate article that can be found by querying on the following words:

R1C1 and reference and relative Using the pair of double quotation marks (&quot;&quot;) in place of the exclamation mark (!) prevents this reference from being parsed until macro run time. The following macro will select the cell at row 3, column 3 on the sheet named &quot;Example&quot; (without quotation marks): =ACTIVATE(&quot;example&quot;) =SELECT(&quot;R1C1&quot;) =SELECT(&quot;R[2]C[2]&quot;) =RETURN The above form is usually appropriate to use when specifying a cell relative to the active cell.

MORE INFORMATION
This information was taken from the &quot;Macro Tips&quot; chapter in the &quot;Microsoft Excel Technical Reference for the Macintosh&quot; (pages 148-149). Please note that for most applications, using the OFFSET statement will provide greater flexibility as well as increased speed, since parsing a text-style reference to an actual reference takes additional time each time the statement is encountered. Also note that the SELECT statement is one of very few functions that will accept a text-style R1C1 reference. For more information on OFFSET, query on the following keywords:

offset and relative and reference The &quot;Microsoft Excel Technical Reference for the Macintosh&quot; is part of the Excel Developer's Kit. This kit can be obtained by calling Microsoft End User Sales and Service at (800) 426-9400.
 * }