Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Salty
 
Posts: n/a
Default Unusual data format

I am hoping someone has done this before.

I have a client who has been presented with several thousand records in
an unusual format. Each is formatted thus:

Name<CR
Agency<CR
Address<CR
CityStateZip (all in one field)
<CR
Phone<CR
Email<CR
<CR
Name<CR
Agency<CR
Address<CR
CityStateZip<CR
Phone<CR
Email<CR
<CR

and so on.

She wants to be able have a standard data file, Excel or CSV to use in
a database. Has anyone seen an automayted method to move these around
without having someone sit and do it manually for several days.

salty

  #2   Report Post  
Harlan Grove
 
Posts: n/a
Default Unusual data format

"Salty" wrote...
....
I have a client who has been presented with several thousand records
in an unusual format. Each is formatted thus:

Name<CR
Agency<CR
Address<CR
CityStateZip (all in one field)<CR


I'm assuming you didn't mean to have the <CR on a different line.

Phone<CR
Email<CR
<CR
Name<CR
Agency<CR
Address<CR
CityStateZip<CR
Phone<CR
Email<CR
<CR

and so on.

She wants to be able have a standard data file, Excel or CSV to use in a
database. Has anyone seen an automayted method to move these around without
having someone sit and do it manually for several days.


This is a very standard format on Unix systems, and there are very short
perl and awk scripts that would convert it from this format into CSV format.
But if you want an Excel solution, open the file as plain text WITHOUT
parsing anything into fields. The data will be in column A.

If all records have 6 fields each on a separate line followed by a blank
line as record separator, select C2:H2, type

=INDEX($A:$A,(ROW()-2)*7+COLUMN()-2)

hold down a [Ctrl] key and press the [Enter] key. This will put the first
record in C2:H2. Fill C2:H2 down as far as needed. Then select the entire
col C to col H range, copy and paste special as values on top of itself,
delete cols A and B, and save the resulting file either as an .XLS file or a
..CSV file.


  #3   Report Post  
Salty
 
Posts: n/a
Default Unusual data format

On 2005-11-03 00:10:11 -0500, "Harlan Grove" said:

I'm assuming you didn't mean to have the <CR on a different line.


No, Harlan, it is there. I think the data came from HTML tables
originally and there may have been a <br there for display clarity.

Checking your solution.


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
How do I copy data in single cell format to a merged cell format Paul Excel Discussion (Misc queries) 1 June 27th 05 11:00 AM
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM
HOW DO I FORMAT DATA FROM YY/MM/DD TO MM/DD/YY? TLH_HELP_DATE Excel Worksheet Functions 0 February 17th 05 08:49 PM
Format Data Series Markers KB Charts and Charting in Excel 1 November 30th 04 03:37 AM


All times are GMT +1. The time now is 12:59 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"