How to parse in excel

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

In a cell, I have say for example:
abcdefg or 1234567
I would like to parse each alphabet or number into 7
cells individually.
How to do it in excel?
Thank you.
 
Paul said:
In a cell, I have say for example:
abcdefg or 1234567
I would like to parse each alphabet or number into 7
cells individually.
How to do it in excel?

With abcdefg in cell A1, enter this formula in cell B1.

=MID(A1,COLUMN(B1)-COLUMN($A1),1)

Fill B1 right into C1:H1.
 
Or use Data -> Text to Columns
Harlan Grove said:
With abcdefg in cell A1, enter this formula in cell B1.

=MID(A1,COLUMN(B1)-COLUMN($A1),1)

Fill B1 right into C1:H1.
 
Paul

Here's a VBA solution:

After parsing the result is in columns B through G.
(Check out the help for the Parse-method.)

Sub ParseCells()
'Leo Heuser, 2 Aug. 2003
Dim Cell As Range
Dim ColumnCellsToParse As Range

Set ColumnCellsToParse = Range("B2:B23")

For Each Cell In ColumnCellsToParse.Cells
Cell.Value = "'" & Cell.Value ' numbers to text
Next Cell

ColumnCellsToParse.Parse _
Parseline:="[x][x][x][x][x][x][x]"
End Sub



--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.
 
Harlan Grove gave you the most obvious and simple solution. I highly
recommend it.
HTH
Richard Choate

In a cell, I have say for example:
abcdefg or 1234567
I would like to parse each alphabet or number into 7
cells individually.
How to do it in excel?
Thank you.
 
Thank you Harlan and all. I made it. But...it should have
a$ sign before A1 when copy & paste.
=MID($A1,COLUMN(B1)-COLUMN($A1),1)
Paul
 
Back
Top