º
º¼ÖÝÈË
Letter of alphabet and numeral separation
If A1= asd123dsa, how to get the B1= asddsa, C1=123
If A1= asd123dsa, how to get the B1= asddsa, C1=123
....Bob Phillips said:Easiest way is probably a UDF
Function BreakString(rng As Range, Optional text As Boolean = True)
Dim i As Long
Dim sTemp As String
For i = 1 To Len(rng.Value)
If IsNumeric(Mid(rng.Value, i, 1)) Then
If text Then
'do nothing
Else
sTemp = sTemp & Mid(rng.Value, i, 1)
End If
Else
If text Then
sTemp = sTemp & Mid(rng.Value, i, 1)
End If
End If
Next i
If text Then
BreakString = sTemp
Else
BreakString = Val(sTemp)
End If
End Function
Dim i As Long, k As Long, c As String * 1