Text to excel
Hey IT folks!
Hope you can help me with a rather messy text file that I am trying to import to excel..
The text file looks like this:
$$$
ankle swelling
HISTORY: Trauma
COMPARISON: []
Technique: AP, lateral and oblique views
FINDINGS: There is no evidence of acute fracture or dislocation. There is lateral soft tissue swelling seen. No evidence of any bone destruction.
IMPRESSION: Soft tissue swelling but no evidence of obvious acute fracture is demonstrated.
$$$
basic
INDICATIONS: <<Clinical Information>>
COMPARISON: [< None. >]
FINDINGS: [ ]
$$$
I would like it to go into excel as this
ColumnA | ColumnB | ColumnC | ||
ankle
swelling
|
HISTORY | Trauma | ||
ankle
swelling
|
COMPARISON: | None | ||
ankle swelling | Technique: | AP, lateral and oblique views | ||
ankle swelling | FINDINGS: | There is no evidence of acute fracture or dislocation. There is lateral soft tissue swelling seen. | ||
basic
|
INDICATIONS: | <<Clinical Information>> | ||
basic
|
COMPARISON: | [< None. >] | ||
basic | FINDINGS: | [ ] |
the only things that are consistent that would identify each column are:
- The start of new title (columnA) is immediately after $$$ this indicates start of new record
- Each of the sub titles (columnB) ends in ":"
- Each of the descriptions (columnC) starts after the ":"
Any one has any ideas? VBA script maybe? but i wouldn't know where to begin!
Thanks in advance.
4 Comments
[ + ] Show comments
Answers (0)
Please log in to answer
Be the first to answer this question
=LEFT(A12,(FIND(":",A12,1)-1)) assuming A12 contained this string from your example -
INDICATIONS: <<Clinical Information>>
Same could be used to find the split in any of your cells which contain the : delimiter. - KHaught 9 years ago