PC Review


Reply
Thread Tools Rate Thread

converting line-delimited text into cells

 
 
Wowbagger
Guest
Posts: n/a
 
      28th Apr 2010
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



 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      29th Apr 2010
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
(E-Mail Removed)
"Wowbagger" <privacy, please> wrote in message
news:e%(E-Mail Removed)...
>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
>
>
>


 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      29th Apr 2010
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
(E-Mail Removed)
"Don Guillett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> (E-Mail Removed)
> "Wowbagger" <privacy, please> wrote in message
> news:e%(E-Mail Removed)...
>>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
>>
>>
>>

>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Pipe Delimited Text File To Tab Delimited Text file Probie Coder Microsoft Access VBA Modules 5 3rd Dec 2009 05:56 AM
Generate a TAB When Converting From Excel to Delimited Text ConfusedNHouston Microsoft Excel Misc 1 31st Jan 2008 05:56 PM
Converting Tab Delimited Text File to A Comma Delimited Text File kwesi.acquah@gmail.com Microsoft Excel Programming 1 13th Jun 2007 03:13 PM
converting .xml to a comma delimited text file Bernie Yaeger Microsoft VB .NET 9 28th Jul 2004 08:53 PM
problem converting delimited text to Excel Mukesh Thakkar Microsoft Excel Misc 3 22nd Jul 2004 12:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 AM.