Microsoft KB Archive/114651

= Microsoft Knowledge Base =

Microsoft Excel Requires R1C1 References with AppleScript
Last reviewed: September 12, 1996

Article ID: Q114651

The information in this article applies to:


 * Microsoft Excel for the Macintosh, version 4.0,5.0

SUMMARY
When you use Microsoft Excel with AppleScript, you must use the R1C1 notation for all cell references. For example, the following AppleScript command will generate an error:

set myresult to (Evaluate "sum(!a1:a6)") In order to reference this cell, you must use the following command instead:

set myresult to (Evaluate "sum(!r1c1:r6c1)")

MORE INFORMATION
Microsoft Excel provides two methods of referencing cells: A1 and R1C1. While it may be more convenient to use the A1 notation, you must use R1C1 notation when you create scripts in AppleScript.

For more information about using AppleScript with Microsoft Excel, query on the following words in the Microsoft Knowledge Base:

using and applescript and excel and r1c1 and events