Ringhal
06-26-2014, 04:23 AM
In the attached workbook, I have something that looks like this:
xxx 3.76 ZAR xxx 0.926 ZAR xxx
xxx 3.76 ZAR xxx 0.39 ZAR xxx
xxx 3.76 ZAR
The above is repeated over a number of rows, where the text and numbers are random, but follow the same pattern as above, as seen in the attached file. The ZAR is always after a number.
I found a UDF that extracts numbers from text strings. http://www.ozgrid.com/VBA/ExtractNum.htm , but it combines the two separate numbers into one cell. I need the numbers separated and in adjacent cells.
An idea I had for solving this is, find the ZAR in the line and extract the number to the left of it.
In assistance is greatly appreciated.11874
xxx 3.76 ZAR xxx 0.926 ZAR xxx
xxx 3.76 ZAR xxx 0.39 ZAR xxx
xxx 3.76 ZAR
The above is repeated over a number of rows, where the text and numbers are random, but follow the same pattern as above, as seen in the attached file. The ZAR is always after a number.
I found a UDF that extracts numbers from text strings. http://www.ozgrid.com/VBA/ExtractNum.htm , but it combines the two separate numbers into one cell. I need the numbers separated and in adjacent cells.
An idea I had for solving this is, find the ZAR in the line and extract the number to the left of it.
In assistance is greatly appreciated.11874