![]() |
Finding the last non bank cell in a column
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 |
Finding the last non bank cell in a 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 |
Finding the last non bank cell in a column
something like LastCellInColumnA = Range("A65536").End(xlUp).Offset(1, 0).Address Just subst the column ..... -- Ivan F Moal ----------------------------------------------------------------------- Ivan F Moala's Profile: http://www.excelforum.com/member.php...nfo&userid=195 View this thread: http://www.excelforum.com/showthread.php?threadid=38029 |
Finding the last non bank cell in a column
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" wrote in message ... 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 |
All times are GMT +1. The time now is 09:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com