Excel: Efficient Use of Memory When Referencing a Range

Last reviewed: April 3, 1997
Article ID: Q51181
2.20 3.00 MACINTOSH macrosheet

SUMMARY

To minimize the amount of memory used by Microsoft Excel version 2.20 or 3.00, keep the data on a worksheet or macro sheet arranged in a rectangular fashion. Empty rows require no memory. However, partially filled rows use about as much memory as the full rows around them.

It is much more efficient to format, or make reference to, a row or column as an entire unit rather than as a large region of the unit.

For example, Excel makes much more efficient use of memory with "SUM(D:D)" than with "=SUM(D1:D16384)". If only a portion of column D actually contains data, then "=SUM(D:D)" requires only memory for those cells that contain data, plus a few bytes to represent the remainder of the column. With "=SUM(D1:D16384)", Excel allocates a few bytes of memory for every individual cell in the range, not just those that contain actual data.

MORE INFORMATION

This information was taken from page 157 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 Development Kit. To obtain this kit, call Microsoft End User Sales and Service at (800) 426-9400


KBCategory: kbother
KBSubcategory:

Additional reference words: 2.20 3.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

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