Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Text to Row by Delimiter


I want to import a text file into excel. Instead of divide the text into
columns by delimiter, I want to divide the text into rows by delimiter.
Can anyone tell me how to do this? Thanks.


--
betty77
------------------------------------------------------------------------
betty77's Profile: http://www.excelforum.com/member.php...o&userid=37092
View this thread: http://www.excelforum.com/showthread...hreadid=568551

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Text to Row by Delimiter

Possibly divide it by column, then select the data and do edit = copy, then
edit = Paste Special = transpose

and delete the residual initial data.

or write code to parse it and place it yourself.

--
Regards,
Tom Ogilvy

"betty77" wrote in
message ...

I want to import a text file into excel. Instead of divide the text into
columns by delimiter, I want to divide the text into rows by delimiter.
Can anyone tell me how to do this? Thanks.


--
betty77
------------------------------------------------------------------------
betty77's Profile:
http://www.excelforum.com/member.php...o&userid=37092
View this thread: http://www.excelforum.com/showthread...hreadid=568551



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Text to Row by Delimiter


Thanks for your help. I first used text to column then I tried to use
small macro to move the data in each row to one column:

text to column by delimiter results:

columnA columnB columnC columnD
A1, B1,C1,D1
A2,B2,
A3
A4,B4,C4
...

I want to eventually have:
A1
B1
C1
D1
A2
B2
A3
A4
B4
C4

So I wrote a macro like the below, but somehow it did not work. Also i
includes all Ax, Bx, Cx, Dx to the new column, not the ones that ha
values in it. Can you help me to modify the code to make it work
Thanks.

Sub Macro1()

Dim j As Integer
Dim i As Integer

For i = 1 To 6078

j = 1

Range("B" & i).Select
Application.CutCopyMode = False
Selection.Copy
Range("A" & j).Select
ActiveSheet.Paste

j = j + 1


Range("C" & i).Select
Application.CutCopyMode = False
Selection.Copy
Range("A" & j).Select
ActiveSheet.Paste

j = j + 1

Range("D" & i).Select
Application.CutCopyMode = False
Selection.Copy
Range("A" & j).Select
ActiveSheet.Paste

j = j + 1

Range("E" & i).Select
Application.CutCopyMode = False
Selection.Copy
Range("A" & j).Select
ActiveSheet.Paste

j = j + 1

Range("F" & i).Select
Application.CutCopyMode = False
Selection.Copy
Range("A" & j).Select
ActiveSheet.Paste

j = j + 1

Range("G" & i).Select
Application.CutCopyMode = False
Selection.Copy
Range("A" & j).Select
ActiveSheet.Paste

j = j + 1

Range("H" & i).Select
Application.CutCopyMode = False
Selection.Copy
Range("A" & j).Select
ActiveSheet.Paste

j = j + 1

Range("I" & i).Select
Application.CutCopyMode = False
Selection.Copy
Range("A" & j).Select
ActiveSheet.Paste

j = j + 1

i = i + 1

Next

End Su

--
betty7
-----------------------------------------------------------------------
betty77's Profile: http://www.excelforum.com/member.php...fo&userid=3709
View this thread: http://www.excelforum.com/showthread.php?threadid=56855

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse delimiter is change from text to numbers ORLANDO V[_2_] Excel Discussion (Misc queries) 11 January 2nd 09 06:56 PM
text to columns - break by delimiter mrl Excel Discussion (Misc queries) 4 April 17th 08 10:16 PM
Need Help Importing Text File Using Two or More Spaces as the Delimiter [email protected] Excel Discussion (Misc queries) 11 June 13th 06 02:08 AM
Need Help Importing Text File Using Two or More Spaces as the Delimiter [email protected] Excel Programming 11 June 13th 06 02:08 AM
Import/Export Text File Tab Delimiter Cool Sport Excel Programming 3 December 20th 04 12:22 PM


All times are GMT +1. The time now is 11:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"