View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default STRIP CHARACTERS

On Sat, 15 Dec 2007 10:27:08 -0800 (PST), rpick60 wrote:

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?


Here's another VBA approach:

==============================
Option Explicit
Sub splitatX()
Dim c As Range
Dim temp
Dim i As Long
For Each c In Selection
temp = Split(LCase(c.Text), "x")
For i = 0 To UBound(temp)
c.Offset(0, i + 1).Value = temp(i)
Next i
Next c
End Sub
===================================
--ron