Hi all - I have a column where the length varies. It starts and ends with alpha characters with numbers in between. I would like to remove the last alpha characters (can be 1-4). I found the code below that removes all the alpha characters. Does anyone know how to tweak it so it only removes the last alpha characters only?
Code:
Public Function RemoveAlpha(ByVal strText As String) As String
Dim strTemp As String
Dim intCounter As Integer
For intCounter = 1 To Len(strText)
If IsNumeric(Mid(strText, intCounter, 1)) Then
strTemp = strTemp & Mid(strText, intCounter, 1)
End If
Next intCounter
RemoveAlpha = strTemp
End Function