View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Convert text to column

Hi ****al

Try:

Sub Tester02()
Selection.TextToColumns Destination:=Selection(1), _
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), _
Array(11, 1))
End Sub


---
Regards,
Norman



"****al" wrote in message
...
Hi to all
I have copyed data from PDF file.
i have to copy more than 20000 data and convert into two
(2) columns.
i want to use Data---Text to Column function.
i try recording macro but it convert only range which is
given in range list. How can i wirte macro that it
convert text to column which i have selected range.

sub text()

Range("J5:J13").Select
Selection.TextToColumns Destination:=Range("J5"),
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(11, 1))
Range("J5").Select
End Sub

any help.