separate mixed data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have following data in one cell. 672 15 73.53 49412.16 17.5 8647.13
In this eaxmple there are 6 data elements. Each one could be of varying
length and separated by at least one space (but would vary). I would likie to
know how I could extract each data element separately.

Thank you.
 
Use the "Text to Columns" Feature on the "Data" Menu. Choose
"Delimited", Check "Space" and check "Treat Consetcutive Delimiters as
1"

Charles Chickering
 
In code?

Dim myArr As Variant
Dim i As Integer

myArr = Split(Application.Trim(ActiveCell.Value), " ")

For i = LBound(myArr) To UBound(myArr)
MsgBox myArr(i)
Next i


HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top