finding last non empty cell in a column

C

cparsons

I am trying to find the last used cell in a column and then select tha
entire range. The activecell here is "B1". What is happening is th
column I am working in has a blank cells within the column so when thi
code runs it the selected range is from B1 down to the first blank cell
I need it to go all the way to the last used cell in the column.

Any suggestions?

Range(ActiveCell, ActiveCell.End(xlDown)).Select

Thanks,
Crai
 
R

Ron de Bruin

Try this

Select B1 first

Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column).End(xlUp)).Select
 
A

Alan Beban

Ron said:
Try this

Select B1 first

Range(ActiveCell, Cells(Rows.Count, ActiveCell.Column).End(xlUp)).Select
Slightly more robust (watch for wordwrap); unlike the code above, this
makes the correct selection even if b65536 is not empty. As with the
above code, Select the cell in the first row first:

Range(ActiveCell, ActiveCell.EntireColumn.Find("*", ActiveCell, , , ,
xlPrevious)).Select

Alan Beban
 
Top