LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Multiple Deliminators

Oi Fraggs,

What you can do is set up a workbook where you have the list of all your
files in a worksheet column, name and path such as "D:\myfile1" in A1,
"D:\myfile2" in A2...

Then, your macro would loop through file references until the end of the
list. Inside the loop you will open (for input access read) each source file,
and also a destination file, with the same name (for append access write),
but with the extension XLS.

Then send each line of the source file (do until eof) to a function that
will search the file for any ocurrence of the characters used as delimiters
(using ASCII code ranges like 32 to 47, or arrays with the delimiters used),
and substitute them by TABS.

The function will return the line delimited with tabs, and you will print it
to the destination file.

Then, when you open the destination file, VOILA, the fields will be already
split.

Best,

Rafael

"Fraggs" wrote:


How do folks,

I have a text file with several different deliminators [ , /, TAB,
SPACE & more ]. What I need to do is create column seperators between
these deliminators.

I know I could use "Text to columns" from the DATA menu, but I have a
lot of files to work through so some VBA would be more helpful.

Anyone got any suggestions ?


--
Fraggs


------------------------------------------------------------------------
Fraggs's Profile: http://www.excelforum.com/member.php...fo&userid=8077
View this thread: http://www.excelforum.com/showthread...hreadid=392919




 
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
finding multiple code dates for multiple item number kmc Excel Worksheet Functions 3 February 6th 09 10:27 PM
SUMPRODUCT, SUMIF, COUNTIF for multiple sheets for multiple criter Greg in CO[_2_] Excel Worksheet Functions 0 September 18th 08 05:51 PM
Automated multiple text files into multiple sheets in one workbook Dr Dan Excel Discussion (Misc queries) 14 November 4th 07 11:32 AM
Delete Blank Rows Code - Multiple Worksheets - Multiple Documents BenS Excel Discussion (Misc queries) 3 June 29th 07 12:20 AM
view multiple files in multiple windows on multiple screens. tcom Excel Discussion (Misc queries) 7 September 15th 05 09:35 PM


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

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"