help to a very special split
i have a convoluted way that may work for you
takes the string in a1 and breaks into a3:c3
Sub test2()
Dim i As Long, j As Long, n As Long, z As Long
For i = 1 To Len(Range("a1").Value)
If Asc(Mid(Range("a1").Value, i)) = 48 And
Asc(Mid(Range("a1").Value, i)) <= 57 Then
Range("a3").Value = Left(Range("a1").Value, i - 1)
j = i
Exit For
End If
Next
For z = 1 To Len(Range("a1").Value)
If Asc(Right(Range("a1").Value, z)) = 48 And
Asc(Right(Range("a1").Value, z)) <= 57 Then
Range("C3").Value = Right(Range("a1"), z - 1)
n = z
Exit For
End If
Next
Range("b3").Value = Mid(Range("A1"), j, Len(Range("a1")) - (j - 1 + n - 1))
End Sub
--
Gary
"alvin Kuiper" wrote in message
...
Hi
I have this in a cell "Text 4numbers Text "
I want to take the first text into a cell
then i want to take the 4 numbers into another cell
and then i want to take the last text into another cell
MAybe i can split by the numbers?
like take alle text before the numbers
then take the numbers and then take alle the text
after the numbers???
Hope someone can help.
Besr regards
Alvin
|