I've assumed that there is always 3 numbers. Try this User-Defined Function (UDF). To implement ..
1. Right click the sheet name tab and choose "View Code".
2. In the Visual Basic window use the menu to Insert|Module
3. Copy and Paste the code below into the main right hand pane that opens at step 2.
4. Close the Visual Basic window.
5. Enter the formula as shown in the screen shot below and copy across the 3 columns and down as shown in B2:D4.
If you want to extract just a particular number (eg the second number following a colon), you could use the function as shown in cell B7.
<font face=Courier New><br><SPAN style="color:#00007F">Function</SPAN> ExtractNum(s <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN>, <SPAN style="color:#00007F">Optional</SPAN> n <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN> = 1) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Single</SPAN><br> <SPAN style="color:#00007F">Static</SPAN> RegEx <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Object</SPAN><br> <br> <SPAN style="color:#00007F">If</SPAN> RegEx <SPAN style="color:#00007F">Is</SPAN> <SPAN style="color:#00007F">Nothing</SPAN> <SPAN style="color:#00007F">Then</SPAN><br> <SPAN style="color:#00007F">Set</SPAN> RegEx = CreateObject("VBScript.RegExp")<br> <SPAN style="color:#00007F">With</SPAN> RegEx<br> .Global = <SPAN style="color:#00007F">True</SPAN><br> .Pattern = ": -*\d*,*\d+\.*\d*"<br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br> <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN><br> <br> ExtractNum = Replace(RegEx.Execute(s)(n - 1), ": ", "")<br> <br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN><br></FONT>
Excel Workbook |
---|
|
---|
| A | B | C | D |
---|
1 | | | | |
---|
2 | Level: 9Shuttle: 1Estimated VO2max: 43.6 ml/kg/min | 9 | 1 | 43.6 |
---|
3 | Level: -0.9Shuttle: 10.236Estimated VO2max: 43.6 ml/kg/min | -0.9 | 10.236 | 43.6 |
---|
4 | Level: 9Shuttle: 18,000Estimated VO2max: 0.6 ml/kg/min | 9 | 18000 | 0.6 |
---|
5 | | | | |
---|
6 | | | | |
---|
7 | Level: -0.9Shuttle: 10.236Estimated VO2max: 43.6 ml/kg/min | 10.236 | | |
---|
|
---|