View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default STRIP CHARACTERS

Option Compare Text 'at TOP of module
Sub findxinstring()
For Each c In Range("e2:e3")
p1 = InStr(c, "x")
'MsgBox p1
p2 = p1 + InStr(p1, c, "x") - 1
'MsgBox p2
c.Offset(, 1) = Left(c, p1 - 1)
c.Offset(, 2) = Mid(c, p1 + 1, p2 - p1)
c.Offset(, 3) = Right(c, Len(c) - 1 - p2)
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"rpick60" wrote in message
...
I looking for awat to break up a cell into 3 different cells.
I can use 3 different formulas if I have too.
I get data like below

123X324X3333
or
1234x45x4343

The amount of numbers may vary abd the X may be x or X.
I can get te first set of numbers with
=LEFT(Q10,MATCH(FALSE,ISNUMBER(-MID(Q10,ROW(INDIRECT("1:8")),
1)),FALSE)-1)
But cannot get the middle or end set of numbers,

Any Ideas?