View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_310_] Leith Ross[_310_] is offline
external usenet poster
 
Posts: 1
Default Last row - Selected Column


Hello Desert Piranha,

Dim Col
Cells(Cells.Rows.Count, Col).End(xlUp).Select

Since Col is a variant it can then be a string like "A" or a number
like 1.

RETURN THE FIRST COLUMN OF A SELECTION:
FirstCol = Selection.Column

RETURN THE LAST COLUMN OF A SELECTION:
With Selection
LastCol = .Columns.Count + .Column - 1
End With

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=487496