Morning All
I am shredding a large excel file (extracted from an xml file). A large number of the cells contain data with large bracketed text strings and superfluous information. The information desired is the information to the left of the first bracket. It will be used to populate lookup tables in Excel or import to Access (too much info for Access to import currently).
Example Cell Value:
125.34 g [Environment; Tech Info for Problem Spills: Ethylbenzene p.83 (1982)]**PEER REVIEWED**
Desired:
125.34 g
I did a search and replace to get rid of the **PEER REVIEWED**.
I added columns to used a following formula to get rid of the bracketed text:
=IF(ISERROR(FIND("[",A1),A1,LEFT(A1,LEN(A1)-(LEN(A1)-FIND("[",A1)+1))))
The search and replace and adding columns etc. allows me to look at the data to ensure minimal errors but is really, really time consuming and Excel gives calculation time warnings. I would like to do it all in code and do it for each cell. Frought with peril but better than hand editing.
Open for suggestions on the best approach. Would like to leave the null strings for now just show it was evaluated.
Bookmarks