Excel: Selecting Active Portion of Spreadsheet Using a Macro

ID: Q26886


SUMMARY

To select the entire active portion of a Microsoft Excel worksheet using a macro, do the following:

  1. Select the range from the first cell in the upper-left corner of the worksheet through the last active cell.


  2. Use the following commands in a command macro:
    =SELECT.LAST.CELL()
    =SELECT(ACTIVE.CELL():!A1)


For more information about the SELECT.LAST.CELL function, see page 382 in "Microsoft Excel Function Reference," version 4.0 manual. If you are using version 3.0, see page 213 in the "Microsoft Excel Function Reference" version 3.0 manual. If you are using Excel 2.20, see page 277 in the "Microsoft Excel Functions and Macros" version 2.2 manual.

Additional query words:


Keywords          : 
Version           : 
Platform          : 
Issue type        : 

Last Reviewed: March 11, 1999