Two ideas:
- Parse it as a string variable, which it will be, [mid(String,n,1) in a (n) loop] until you get a digit, then do your split with something like LEFT(String,LEN(s)-nn)and RIGHT(String,LEN(s)-nn).
- If you know the number is always last, then parse it for a space from the right.
Your results example doesn't work on Yahoo. It doesn't show tabs, but no problem.
--
73, Steve
--- In ExcelVBA@yahoogroups.com, Barry White <imtigerwords@...> wrote:
>
> Howdy all,
>
> I have example data below,
>
> DIFF WKND PCT A 1090.52
> REG 13621.58
>
> I want the above data split into 2 columns and only ever two columns.
>
> 1. All the text or alpha characters in one column
>
> 2. All the numeric characters in another column
>
> The result should be below:
>
> DIFF WKND PCT A 1090.52
> REG 13621.58
>
> How do I do this? Text to columns by the "delimited space" method winds up that the first row contains 5 columns and the second row contains two, and the numeric portion is slotted in different columns because of it.
> Eric Lutz
>
> .
>
>
>
> [Non-text portions of this message have been removed]
>
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Tidak ada komentar:
Posting Komentar