View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] MaryLindholm@gmail.com is offline
external usenet poster
 
Posts: 16
Default fixed length file to excel? VBA macro possible?

have a text file I need to convert to an excel spreadsheet. I
wouldn't have a problem making an array code if it were a straight file
but the trick is that each line could be different.

For example:

Line one is

01330948951000312 eeid jan boerenkamp

line 2 is

023330948951000312 00370058274800350010112/01/2002

Line 3 is

05330948951000312 31065327123107533811

any time a line begins with 01 it will follow that format

any time a line begins with 02 it will follow the format of line 2 and
so on

Is there a way to make an array to put into Excel so that if a line
starts with 01 it splits it one way and if a line begins with 02 it
splits another way and so on?

Thanks in advance