Hi
Hopefully a simple question - how do you find the last non blank cell in
a column ? The trick is that the column may contain blank cells along
the way before reaching the last non blank cell.
TIA
Andrew Bourke
Hi
Hopefully a simple question - how do you find the last non blank cell in
a column ? The trick is that the column may contain blank cells along
the way before reaching the last non blank cell.
TIA
Andrew Bourke
something like
LastCellInColumnA = Range("A65536").End(xlUp).Offset(1, 0).Address
Just subst the column ......
Hi,
lastrow = Cells(Rows.Count, "A").End(xlUp).Row ' Last row in column A
lastcell = Cells(lastrow, "A")
HTH
"Andrew B" wrote:
> Hi
> Hopefully a simple question - how do you find the last non blank cell in
> a column ? The trick is that the column may contain blank cells along
> the way before reaching the last non blank cell.
>
> TIA
> Andrew Bourke
>
Here is an approach for last row and last column.
Dim lrow As Long, lcol As Integer
' last row of non-empty cell in column 1
lrow = Cells(Rows.Count, 1).End(xlUp).Row
'last column of non-empty cell in row 1
lcol = Cells(1, Columns.Count).End(xlToLeft).Column
--
Cheers
Nigel
"Andrew B" <[email protected]> wrote in message
news:[email protected]...
> Hi
> Hopefully a simple question - how do you find the last non blank cell in
> a column ? The trick is that the column may contain blank cells along
> the way before reaching the last non blank cell.
>
> TIA
> Andrew Bourke
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks