Microsoft KB Archive/51062

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.


Excel: Using External References to Make Macros Run Faster

Last reviewed: April 3, 1997
Article ID: Q51062

1.50 2.20 3.00 MACINTOSH kbother

SUMMARY

To reference cells on other sheets in Microsoft Excel version 1.50 or later, use external references. Using external references is much more efficient than activating the desired sheet, selecting the appropriate cell, and then returning to the original sheet.

For example, the following macro selects cell R2C2 (B2) on Sheet2 by activating Sheet2 and then returning to Sheet1:

   =ACTIVATE("Sheet2")
   =SELECT("R2C2")
   =FORMULA("=1+1")
   =ACTIVATE("Sheet1")
   =RETURN()

You can accomplish the same result much faster by using the following macro commands:

   =FORMULA("=1+1",Sheet2!B2)
   =RETURN()

MORE INFORMATION

This information was taken from page 151 in the "Macro Tips" section of the "Microsoft Excel Technical Reference for the Macintosh."

The "Microsoft Excel Technical Reference for the Macintosh" can be obtained as part of the Excel Developer's Kit by calling Microsoft End User Sales and Service at (800) 426-9400.


KBCategory: kbother

KBSubcategory:

Additional reference words: 1.50 2.20 3.00


Last reviewed: April 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.