MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Anybody know how to create a Macro to format a comma-deliminated file

Posted by Jim on November 27, 2000 1:12 PM

Dear Anyone,
I have a comma delimited file and I'd like to open
it with excel and have a macro format the data into
the appropriate column headings.
I'm in the development stage and I need to know
how to create an excel macro which will run
when the application (excel) opens the comma delimited
file. I will potentially have up to 300 data fields so
the task of reformating the comma delimited file
everytime the file is generated wil will be tedious
and repetative.
Appreciate any feedback even if it's a nother resource.

Posted by Ivan Moala on November 28, 2000 12:19 AM

A comma delimited file can be opened in excel.
easiest way to do this is to turn on your macro
recorder and start your actions eg. open file
then proceed with formating it.
If your data is static this will be easy.
You will probably end up with a lot of unneccessary code.
BUT at least you will have something in which to
work on. If you would like an example then send me
the file, with some more specifics eg. How it is to
be formated, any variations to the format etc.
No promises on the time....I find my self been
extremely busy of late.