View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elton Law[_2_] Elton Law[_2_] is offline
external usenet poster
 
Posts: 173
Default Split by characters

Hi all,
I have tested (functions + marcos).
That's really amazing. Before that, I don't believe that can be done ....
Anyway, made it !
Thanks indeed ....... Thanks


"Rick Rothstein" wrote:

If you are willing to use a macro as others have suggested, then here is my
macro offering for you to consider...

Sub SplitIt()
Dim R As Range
Dim S As String
For Each R In Selection
S = R.Value
If Len(S) Then
R.Offset(, 1).Value = Val(S)
R.Offset(, 3).Value = StrReverse(Val(StrReverse(S)))
R.Offset(, 2).Value = Replace(Split(Split(S, R.Offset(, 1).Value) _
(1), R.Offset(, 3).Value)(0), "0", "")
End If
Next
End Sub

The only thing this macro won't handle (as presently written) is numbers
with decimal points in them.

--
Rick (MVP - Excel)


"Elton Law" wrote in message
...
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