ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Range description (https://www.excelbanter.com/excel-programming/300950-range-description.html)

N E Body

Range description
 
Hello everyone

At present I am using

Range("A4:A3000")

How can I say Range("A4:A{last non empty cell}")

I can locate the cell with Range("A65536").End(xlUp) but how do you write
this as a range reference?

Kenny



Harald Staff

Range description
 
Hi Kenny

Dim R As Range
Set R = Range(Range("A4"), Range("A65536").End(xlUp))

HTH. Best wishes Harald

"N E Body" skrev i melding
...
Hello everyone

At present I am using

Range("A4:A3000")

How can I say Range("A4:A{last non empty cell}")

I can locate the cell with Range("A65536").End(xlUp) but how do you write
this as a range reference?

Kenny






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

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