J
John
Hi: I have a VBA function that returns a string which represents a numeric
value. I need to make that string into a value for calculations. I have
tried the "Value" function without any luck.
The formula follows.
Function AFTLAST(cell As Range, findchar As String) As String
Dim i As Long
For i = Len(cell) To 1 Step -1
If Mid(cell, i, 1) = findchar Then
AFTLAST = Mid(cell, i + 1, 99)
Exit Function
End If
Next i
AFTLAST = cell
End Function
This function evaluates a long string which has several numeric characters.
I must be doing something wrong.
value. I need to make that string into a value for calculations. I have
tried the "Value" function without any luck.
The formula follows.
Function AFTLAST(cell As Range, findchar As String) As String
Dim i As Long
For i = Len(cell) To 1 Step -1
If Mid(cell, i, 1) = findchar Then
AFTLAST = Mid(cell, i + 1, 99)
Exit Function
End If
Next i
AFTLAST = cell
End Function
This function evaluates a long string which has several numeric characters.
I must be doing something wrong.