Microsoft KB Archive/50407

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 18:56, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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



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:


Copyright Microsoft Corporation 1993.