View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
aileen aileen is offline
external usenet poster
 
Posts: 78
Default move data based on number of characters in a cell

This worked perfectly...Thanks!

"Don Guillett" wrote:

for the data given, this should do it.

Sub breakitup()
For Each c In Range("c2:c10")
If Len(c) 3 Then
c.Offset(, 1) = Mid(c, 3, 1)
c.Offset(, 2) = Mid(c, 4, 2)
End If
Next c
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"aileen" wrote in message
...
I have a column of data as such:
ESZ8
ESZ10
SPT
SPY
SPV
ESH9
SPC12

For the celss that have more than 3 characters I would like to separate
the
data into new columns as follows: ignore the first 2 characters then place
the 3rd character in a new column and any remaining characters which will
always be numbers in another column.

e.g
A B C
ESZ8 z 8
ESZ10 z 10
SPT
SPY
SPV
ESH9 h 9
SPC12 c 12

Is this at all possible? As usual, thank you for any help you can give.