Thread
:
parsing text file, and generating distinct cell values
View Single Post
#
1
Posted to microsoft.public.excel.programming
gerridge
external usenet poster
Posts: 1
parsing text file, and generating distinct cell values
I've got a text file that's not delimited in any way that makes it
easy to manipulate.
It looks exactly like this...
1. CONTACT INFORMATION:
-----------------------
Company Name: IBM
Industry Type: Consulting
Street Address: 300 E. 54th St Floor#: 10 Suite #: 0
City: New York
State: NY ZIP + 4: 10021 - 0000
Contact1: John Doe
Title1: Vice President
Phone1: (212) 555-4451
Email1:
.... with this contact information for hundreds of companies (each
distinct set of company values preceded by the "1. CONTACT
INFORMATION:" header).
What I'd like to do is parse the file, and generate separate cell
values for the data included. So, the above information would appear
in one row, with separate cells for the data appearing in "Company
Name", "Industry Type", "Street Address", etc... The next row in file
would have the values for the next company in the text file.
I can load the file into VBA, but I can't figure how to parse it in
the way I need. Even though there are certain rows with multiple data
values (e.g., "state" & "zip") it would be enough to create a cell
value for each row and leave state & zip glommed together.
Any idea as to how this could be accomplished?
Thanks,
-DG
Reply With Quote
gerridge
View Public Profile
Find all posts by gerridge