View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Find last column with data?

try it this way
Function LastColumn(x)
LastColumn = Cells(x, Columns.Count).End(xlToLeft).Column
End Function

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Myles" wrote in message
...
Okay guys so i tried to convert some code i found for last Row with text
in
it..

Function LastColumn(Row As String)
LastColumn = Range(Columns.Count & Row).End(xlToRight).Column
End Function

But i get an error when trying to use it

Does anybody know how to convert this to get the last column with text
with
the Row is supplied?

Thanks!!