ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Last empty cell (https://www.excelbanter.com/excel-programming/321022-last-empty-cell.html)

myleslawrence

Last empty cell
 
I want to assign a value to F20 or F21 or the last available F cell on the
page. Is there a way of determining which one that is?
Thanks



Norman Jones

Last empty cell
 
Hi Myles,

Try:

Dim fFrstEmpty As Range

Set FirstEmpty = Cells(Rows.Count, "F").End(xlUp)(2)

---
Regards,
Norman



"myleslawrence" wrote in message
...
I want to assign a value to F20 or F21 or the last available F cell on the
page. Is there a way of determining which one that is?
Thanks




myleslawrence

Last empty cell
 
Works like a champ - thanks

"Norman Jones" wrote in message
...
Hi Myles,

Try:

Dim fFrstEmpty As Range

Set FirstEmpty = Cells(Rows.Count, "F").End(xlUp)(2)

---
Regards,
Norman



"myleslawrence" wrote in message
...
I want to assign a value to F20 or F21 or the last available F cell on the
page. Is there a way of determining which one that is?
Thanks







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

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