#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 117
Default Columns

I have a text-file with 10,000 rows. (Each row contains an
item-number, a name, an address and an amount).

I used a text-editor (TEXTPAD) to move the item-numbers, names,
addresses and amounts to varying positions. (Each field is separated
by many spaces).

For example:

In the first row, the item-number may start in position 1 and end in 8.
In the second row, the item-number may start in 32 and end in 62
In the third row, the item-number may start in 40 and end in 50.
In the fourth row, the item-number may start in 18 and end in 75.

(A similar scenario applies to the names, addresses and amounts).


Now, when I open the text-file in Excel, I click on 'fixed-width'.
Then, I'm asked to create "break lines" to separate each field into
columns.

For the 10,000 rows, how can I determine the maximum width (i.e., the
first and the last positions) of each field?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 618
Default Columns

You haven't got "fixed width" fields, so that option won't work. You might
try "delimited" with space as separator, but that would split fields with
spaces in them (such as address lines). You may be better off going back to
the text file and using an editor to convert multiple spaces to a delimiting
character (perhaps % or some character that isn't included in your file, and
then use that as the delimiter, rather than space). You may also want to
replace %space by % before importing, to avoid importing extraneous leading
spaces into your Excel fields.
--
David Biddulph

"GARY" wrote in message
ps.com...
I have a text-file with 10,000 rows. (Each row contains an
item-number, a name, an address and an amount).

I used a text-editor (TEXTPAD) to move the item-numbers, names,
addresses and amounts to varying positions. (Each field is separated
by many spaces).

For example:

In the first row, the item-number may start in position 1 and end in 8.
In the second row, the item-number may start in 32 and end in 62
In the third row, the item-number may start in 40 and end in 50.
In the fourth row, the item-number may start in 18 and end in 75.

(A similar scenario applies to the names, addresses and amounts).


Now, when I open the text-file in Excel, I click on 'fixed-width'.
Then, I'm asked to create "break lines" to separate each field into
columns.

For the 10,000 rows, how can I determine the maximum width (i.e., the
first and the last positions) of each field?



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
Cutting and pasting from rows into columns and visa versa. Pank New Users to Excel 2 November 8th 06 01:54 PM
Need a macro to hide certain columns Dallman Ross Excel Discussion (Misc queries) 12 October 19th 06 05:58 PM
Selecting different multiple columns rcg Excel Worksheet Functions 1 September 26th 06 05:58 PM
adding three consecutive columns Darin Gibson Excel Worksheet Functions 1 November 22nd 05 08:50 PM
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns foofoo Excel Discussion (Misc queries) 1 April 2nd 05 12:02 AM


All times are GMT +1. The time now is 09:10 AM.

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

About Us

"It's about Microsoft Excel"