Hi All,
I need to write a series of formulas (or VBA preferably) to take a single string (column A) and break it into separate columns (B-F). The columns should split the text each time the characters change from text to numeric and vice versa. An example of my data in column A w/ output in columns B-F:
<table border="0" cellpadding="0" cellspacing="0" width="456"><col style="width: 102pt;" width="136"> <col style="width: 48pt;" width="64" span="5"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; width: 102pt;" width="136" height="20">A</td> <td class="xl66" style="border-left: medium none; width: 48pt;" width="64">B</td> <td class="xl66" style="border-left: medium none; width: 48pt;" width="64">C</td> <td class="xl66" style="border-left: medium none; width: 48pt;" width="64">D</td> <td class="xl66" style="border-left: medium none; width: 48pt;" width="64">E</td> <td class="xl66" style="border-left: medium none; width: 48pt;" width="64">F</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">IN700</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">IN</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">700</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC02BK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">02</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">BK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC02C</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">02</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC02M</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">02</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">M</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC02Y</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">02</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">Y</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC04BK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">04</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">BK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC04C</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">04</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC04M</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">04</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">M</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC04Y</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">04</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">Y</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC21BK2PK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">21</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">BK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">PK</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC21BKS</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">21</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">BKS</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> </tbody></table>
Since the string can switch between text/numeric a variable number of times Im thinking I may have to use a recursive VBA function. However, thats not my strength. Any help is much appreciated.
Thanks,
Scott
I need to write a series of formulas (or VBA preferably) to take a single string (column A) and break it into separate columns (B-F). The columns should split the text each time the characters change from text to numeric and vice versa. An example of my data in column A w/ output in columns B-F:
<table border="0" cellpadding="0" cellspacing="0" width="456"><col style="width: 102pt;" width="136"> <col style="width: 48pt;" width="64" span="5"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; width: 102pt;" width="136" height="20">A</td> <td class="xl66" style="border-left: medium none; width: 48pt;" width="64">B</td> <td class="xl66" style="border-left: medium none; width: 48pt;" width="64">C</td> <td class="xl66" style="border-left: medium none; width: 48pt;" width="64">D</td> <td class="xl66" style="border-left: medium none; width: 48pt;" width="64">E</td> <td class="xl66" style="border-left: medium none; width: 48pt;" width="64">F</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">IN700</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">IN</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">700</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC02BK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">02</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">BK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC02C</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">02</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC02M</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">02</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">M</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC02Y</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">02</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">Y</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC04BK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">04</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">BK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC04C</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">04</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">C</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC04M</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">04</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">M</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC04Y</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">04</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">Y</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC21BK2PK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">21</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">BK</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">2</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">PK</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt; border-top: medium none;" height="20">LC21BKS</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">LC</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">21</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">BKS</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl66" style="border-top: medium none; border-left: medium none;">
</td> </tr> </tbody></table>
Since the string can switch between text/numeric a variable number of times Im thinking I may have to use a recursive VBA function. However, thats not my strength. Any help is much appreciated.
Thanks,
Scott