A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

converting line-delimited text into cells



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2010, 09:29 PM posted to microsoft.public.excel.newusers
Wowbagger
external usenet poster
 
Posts: 100
Default converting line-delimited text into cells

I have a text file with approximately 1000 lines of data, each line is 100
chars or less.

The first 15 lines are column headers (some columns are unused), then every
12 subsequent lines is one record.

What is the easiest way to get each record to appear in Excel (2007) on a
single line, one field per column?

Thank you



  #2  
Old April 29th, 2010, 02:21 PM posted to microsoft.public.excel.newusers
Don Guillett[_2_]
external usenet poster
 
Posts: 607
Default converting line-delimited text into cells

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Wowbagger" privacy, please wrote in message
...
I have a text file with approximately 1000 lines of data, each line is 100
chars or less.

The first 15 lines are column headers (some columns are unused), then
every 12 subsequent lines is one record.

What is the easiest way to get each record to appear in Excel (2007) on a
single line, one field per column?

Thank you




  #3  
Old April 29th, 2010, 04:19 PM posted to microsoft.public.excel.newusers
Don Guillett[_2_]
external usenet poster
 
Posts: 607
Default converting line-delimited text into cells

Sub GETDATA()

With Sheet2.Range("a1:a200")
Set c = .Find(What:="FILE ID #", LookIn:=xlValues, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True)
r = 2
If Not c Is Nothing Then
firstAddress = c.Address
Do
'MsgBox c.Row
With Sheet3
.Cells(r, 4) = c.Offset(10)
.Cells(r, 5) = c
End With
Set c = .FindNext(c)
r = r + 1

Loop While Not c Is Nothing And c.Address firstAddress
End If
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Don Guillett" wrote in message
...
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Wowbagger" privacy, please wrote in message
...
I have a text file with approximately 1000 lines of data, each line is 100
chars or less.

The first 15 lines are column headers (some columns are unused), then
every 12 subsequent lines is one record.

What is the easiest way to get each record to appear in Excel (2007) on a
single line, one field per column?

Thank you





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.