Macro to Set the Last Cell in Selected Range as Active CellLast reviewed: November 2, 1994Article ID: Q65332 |
The information in this article applies to:
SUMMARYAfter a range of cells is selected on a Microsoft Excel worksheet, the active cell is the first cell in the range. The macro command to make the last cell in the range the active cell is as follows:
=SELECT(,"r["&ROWS(SELECTION())-1&"]c["&COLUMNS(SELECTION())-1&"]")If the range A1:D5 is the current selection, D5 will become the active cell after executing the above command. Note: the information above also applies to version 5.0 only when using version 4.0 macro language.
|
KBCategory: kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |