Split by characters
Below is a UDF to split....Try and feedback
A1 = 23m13
B1 = Splitbynumbers($A1,1)
C1 = Splitbynumbers($A1,2)
D1 = Splitbynumbers($A1,3)
Function SplitbyNumbers(varRange, intPos As Integer) As String
Dim intTemp As Integer
Dim intStep As Integer
Dim arrTemp(3) As Variant
For intTemp = 1 To Len(varRange)
If IsNumeric(Mid(varRange, intTemp, 1)) Then
intStep = IIf(arrTemp(2) = Empty, 1, 3)
arrTemp(intStep) = arrTemp(intStep) & Mid(varRange, intTemp, 1)
Else
arrTemp(2) = arrTemp(2) & Mid(varRange, intTemp, 1)
End If
Next
SplitbyNumbers = arrTemp(intPos)
End Function
--
If this post helps click Yes
---------------
Jacob Skaria
"Elton Law" wrote:
Hi OssieMac,
Sometimes, the text in a cell is ...
9j36 in one cell
12k27 in one cell
23m13 in one cell
1°26
Honestly, I want to split numerical figure in front of the Alphabet or ° in
one column.
Put alphabet or ° in one column
Numerical figure after the Alphabet or ° in one column
Then make it from 1 cell to 3 columns.
Is that feasible ?
"OssieMac" wrote:
Hi Elton,
Try Data - Text to columns.
--
Regards,
OssieMac
"Elton Law" wrote:
Dear Expert,
How to split a cell into 3 parts if they are like this please ?
Befo
9j36 in one cell
After:
9 j 36 in 3 different cells
Befo
10°32 in one cell
10 ° 32 in 3 different cells
Thanks
|