View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default Selecting The Last Row

Function LastRow(rng As Range)
On Error Resume Next
LastRow = 1
With rng
LastRow = .Find("*", .Cells(1), xlFormulas, _
xlWhole, xlByRows, xlPrevious).Row
End With
End Function


Call it like

myLastRow = LastRow(Range("A:W"))

--
HTH

Bob Phillips

"Minitman" wrote in message
...
Greeting,

I need to select columns A thru W on the last filled row. I know that
Range("A65536").End(xlUp) will get me to the first cell of the last
row, but how do I get from first cell to A thru W?

Any help would be appreciated.

TIA

-Minitman