Microsoft KB Archive/50407

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.

Selecting a Range from Active Cell to End of Column in Excel PSS ID Number: Q50407 Article last modified on 02-26-1993 PSS database name: W_eXceL

2.00 2.01 2.10 3.00 | 2.20 3.00

WINDOWS | OS/2

Summary:

The following command macro selects the range from the currently active cell to the last cell in the current column containing data [irrespective of intervening blank cells, as with SELECT.END(4)], when the last cell in a column containing data is unknown:

A1 Select_Here_to_End A2 =ECHO(FALSE) A3 =SET.NAME(“top”,ACTIVE.CELL()) A4 =SELECT(“r16384c”) A5 =SELECT.END(3) A6 =SELECT(top:ACTIVE.CELL()) A7 =RETURN()

For example, if the last cell in column D that contains data is D125, and the active cell is D28, then executing this macro causes D28:D125 to be selected.

More Information:

If you prefer to select to the end of a row instead of the end of a column (C12:AH12, for example), substitute the following macro:

A4 =SELECT(“RC256”) A5 =SELECT.END(1)

Copyright Microsoft Corporation 1993.