View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rowan Drummond[_3_] Rowan Drummond[_3_] is offline
external usenet poster
 
Posts: 414
Default Last row - Selected Column

Try:

Sub Example1()
Cells(Rows.Count, ActiveCell.Column).End(xlUp).Select
End Sub

Regards
Rowan

Desert Piranha wrote:
Hi all,
I know how to get the last row with the column "hard coded" IE:

Code:
--------------------
Sub Example1()
Cells(Cells.Rows.Count, "A").End(xlUp).Select
End Sub

--------------------
But instead of hard coding a column i want to select the column.
something like:
Code:
--------------------
Sub Example2()
Cells(Cells.Rows.Count, "With Selection").End(xlUp).Select
End Sub

--------------------
It dosen't work of course. Any direction on this would be appreciated.
Thx
Dave