blooze_hound
New Member
- Joined
- Dec 31, 2013
- Messages
- 2
Hello,
I'm looking for a macro for Excel 2007 to expand alphanumeric text contained in a column. For example cell A:1 may contain TP1-6 TP30-TP34 which would be expanded into TP1, TP2, TP3, TP4, TP5, TP6, TP30, TP31, TP32, TP33, TP34 and placed into an empty cell in B:1. Cell A:2 may contain X1-X19, expanded to X1, X2, X3, X4, etc and placed into an empty cell in B:2. Any cells without ranges it would need to copy the contents to the adjacent empty cell. This would then be repeated for the entire column with varying text before the numbers (R12-23, JP3-7 etc) until a blank cell is reached. The range will always be delineated with the dash.
Thanks in advance for your help.
Excel 2007
<tbody>
</tbody>
I'm looking for a macro for Excel 2007 to expand alphanumeric text contained in a column. For example cell A:1 may contain TP1-6 TP30-TP34 which would be expanded into TP1, TP2, TP3, TP4, TP5, TP6, TP30, TP31, TP32, TP33, TP34 and placed into an empty cell in B:1. Cell A:2 may contain X1-X19, expanded to X1, X2, X3, X4, etc and placed into an empty cell in B:2. Any cells without ranges it would need to copy the contents to the adjacent empty cell. This would then be repeated for the entire column with varying text before the numbers (R12-23, JP3-7 etc) until a blank cell is reached. The range will always be delineated with the dash.
Thanks in advance for your help.
Excel 2007
A | B | |
---|---|---|
1 | TP1-6 TP30-34 | TP1, TP2, TP3, TP4, TP5, TP6, TP30, TP31, TP32, TP33, TP34 |
2 | R1 | R1 |
3 | R13, R14, R15, R16 | R13, R14, R15, R16 |
4 | X19-X20 | X19,X20 |
5 | R3 R9 R10 R26 | R3 R9 R10 R26 |
<tbody>
</tbody>