ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MACRO range find last row (https://www.excelbanter.com/excel-programming/369229-macro-range-find-last-row.html)

Helmut

MACRO range find last row
 
Hi,
I want to write Macro which finds LAST_ROW_NUMBER and then inserts it into a
RANGE for PRINTING or SORTING
i.e. rows keep adding daily and for Sort Macro Range I need the
LAST_ROW_NUMBER
right now I do it with a DIM and INPUTbox but I want to do it without manual
interface.
thanks
Helmut

Bob Phillips

MACRO range find last row
 

LastRow = Cells(Rows.Count,"A").End(xlUp).Row

assuming you are looking in column A

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Helmut" wrote in message
...
Hi,
I want to write Macro which finds LAST_ROW_NUMBER and then inserts it into

a
RANGE for PRINTING or SORTING
i.e. rows keep adding daily and for Sort Macro Range I need the
LAST_ROW_NUMBER
right now I do it with a DIM and INPUTbox but I want to do it without

manual
interface.
thanks
Helmut





All times are GMT +1. The time now is 04:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com