Function LastUsedRange(SheetName As String) As String
Application.Volatile True
Dim Wks As Worksheet
On Error Resume Next
Set Wks = Worksheets(SheetName)
If Err.Number <> 0 Then
Err.Clear
LastUsedRange = "Sheet not exist!"
End If
LastUsedRange = Wks.UsedRange.Address(rowabsolute:=False,
columnabsolute:=False)
End Function
would retrieve the last numeric value (number, date, time) from A.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.