ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how can I find last populated cell in a row (or column) (https://www.excelbanter.com/excel-programming/298570-re-how-can-i-find-last-populated-cell-row-column.html)

CST[_2_]

how can I find last populated cell in a row (or column)
 
Assuming you don't have any null rows in a cell or column and you know
the starting cell, you can use:

Selection.End(xlToRight).Select 'For Columns
Selection.End(xlDown).Select 'For Rows
Cells(65536, "A").End(xlUp).Row 'Used if there are null rows and you
need to find the absolute last cell

Where Selection is your starting cell.

HTH

"alekm" wrote in message ...
Hi,
how can I find last populated (not null) cell in a row (or column)

thanx

alekm



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

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