I need a macro to help with text to columns for a document of inconsistent strings.
Ex strings
I want to separate the string at an identifier that starts with the letter Q and some number :
Ex identifier Q12:toName:fromName:1
with everything before the identifier in 1 cell, the identifier in the 2nd cell, and the last number is the 3rd cell.
So that
Would become
I tried doing this with a fixed width text to columns, but some of the strings have different amounts of spaces and characters in the first portion of the string.
I also tried separating the string at a P character, but some of the names start with P which caused problems.
Ex strings
123456 *toName 4 100.00 234567 fromName 2 12.000 2 Q12:toName:fromName:1 165.0 183.7 26.0 185.5 112.5 |
234567 *toName2 2 17.000 345678 fromName 2 13.000 1 Q63:toName:fromName:1 120.0 125.6 2.0 125.6 104.1 |
345678 *toName! 8.000 fromName2 WND 3 1 Q12:toName:fromName:1 5.3 17.7 8.8 19.8 373.4 |
I want to separate the string at an identifier that starts with the letter Q and some number :
Ex identifier Q12:toName:fromName:1
with everything before the identifier in 1 cell, the identifier in the 2nd cell, and the last number is the 3rd cell.
So that
123456 *toName 4 100.00 234567 fromName 2 12.000 2 Q12:toName:fromName:1 165.0 183.7 26.0 185.5 112.5 |
Would become
123456 *toName 4 100.00 234567 fromName 2 12.000 2 | Q12:toName:fromName:1 | 112.5 |
I tried doing this with a fixed width text to columns, but some of the strings have different amounts of spaces and characters in the first portion of the string.
I also tried separating the string at a P character, but some of the names start with P which caused problems.
I am currently using Excel 2013 on Windows 10. Any help or ideas would be greatly appreciated! |