Finding End of Rows and Columns in Excel Using XLM CodeID: Q41489
|
Macro Comments
----- --------
=DEFINE.NAME("start") Names the upper left cell
=WHILE(ACTIVE.CELL()<>"") Tests for active cell to be blank
=SELECT("rc[1]") Selects the next column to right
=NEXT() Loops if not blank
=SELECT("rc[-1]") If blank, backs up one cell
=WHILE(ACTIVE.CELL()<>"") Tests for active cell to be blank
=SELECT("r[1]c") Selects the next row down
=NEXT() Loops if not blank
=SELECT("r[-1]c") If blank, backs up one cell
=DEFINE.NAME("stop") Names the cell "stop"
=SELECT("start:stop") Selects range
=RETURN()
Additional query words:
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: March 12, 1999