Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
finding multiple code dates for multiple item number | Excel Worksheet Functions | |||
SUMPRODUCT, SUMIF, COUNTIF for multiple sheets for multiple criter | Excel Worksheet Functions | |||
Automated multiple text files into multiple sheets in one workbook | Excel Discussion (Misc queries) | |||
Delete Blank Rows Code - Multiple Worksheets - Multiple Documents | Excel Discussion (Misc queries) | |||
view multiple files in multiple windows on multiple screens. | Excel Discussion (Misc queries) |