ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to find last datafield (https://www.excelbanter.com/excel-programming/283981-macro-find-last-datafield.html)

Patrick[_6_]

Macro to find last datafield
 
Hi, how it's possible to find the last datafield in a range where you not
known the amount of data.
How you can select the data in an xls.

Thanks

Patrick



Paul B[_6_]

Macro to find last datafield
 
Patrick, this will select the last thing in Column A, is that what you need?
Range("A65536").End(xlUp).Select

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 97
** remove news from my email address to reply by email **
"Patrick" wrote in message
. be...
Hi, how it's possible to find the last datafield in a range where you not
known the amount of data.
How you can select the data in an xls.

Thanks

Patrick





No Name

Macro to find last datafield
 
If the data in the range is always in a single block (that
is, no blank rows or columns), then

rng.Cells(1,1).CurrentRegion

will give you the part of the range which actually
contains data.

Regards, Andy Keen

-----Original Message-----
Hi, how it's possible to find the last datafield in a

range where you not
known the amount of data.
How you can select the data in an xls.

Thanks

Patrick


.



All times are GMT +1. The time now is 07:29 AM.

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