View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sebation.G[_2_] Sebation.G[_2_] is offline
external usenet poster
 
Posts: 37
Default convert one column into many columns

P.S:
St = Split(Cells(A, 1), ";")
u can change ";" with the delimiter in your sheet

"Sebation.G" l...
hi
ALT+F11 - copy this code
Sub test()
Dim St() As String
Dim A As Long
Dim B As Long
On Error Resume Next
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
For A = 1 To lastrow
St = Split(Cells(A, 1), ";")
For B = 0 To UBound(St)
Cells(A, 2 + B) = St(B)
Next
Next
End Sub
then hit F5(run)

Hope this can be helpful

--
Regards,

Sebation.G
"Ajay" ...
Hi,
The delimiter is at every 9th record..so Excel is converting the 9th,
18th,
27th...cell into next column.

Any more ideas?
thanks.

"JE McGimpsey" wrote:

One way:

Choose Data/Text to Columns/Delimited


In article ,
Ajay wrote:

Hi,
I have a column which contains data that shd go into 9columns.

can anybody tell me how to convert this single column into 9 columns?
I have
a delimiter at every 9th record.

thanks,
Ajay