Help Needed: How to get the Decimal (REAL) number Only in an string in using an Excel formula or VBA? I have in "column A" a string with just one decimal number on it. I want to extract that decimal (REAL) number ONLY but it is extracting the first number on the string. See below for details...
Current Situation:
I am using on Column B the Formula:
=LOOKUP(9.9E+307,--LEFT(MID(A1,MIN(FIND({1,2,3,4,5,6,7,8,9,0}, $A1&"1023456789")),999),ROW(INDIRECT("1:999"))))
Column A | Column B
"Some text"... The Value of Project 456 is 12.56 ... more text. | 456
Some Text"... Project 459 value is 13.5 ... "more text" | 459
Desired Situation:
I want to get the decimal (REAL) number ONLY out of the string and ignore the numbers that doesn't contain decimals from Column A. Example:
Column A | Column B
"Some text"... The Value of Project 456 is 12.56 ... more text. | 12.56
Some Text"... Project 459 value is 13.5 ... "more text" | 13.5
Any help needed is appreciated, could be an excel formula or VBA solution.
Thank you!
This Array formula will sum all the number that have
.
in them, per stirng. If only one per string then it returns just that one:Being an array formula it must be confirmed with Ctrl-Shift-enter instead of Enter when exiting edit mode:
Try this UDF pasted into a standard public module code sheet.
Note that while it defaults to the first occurrence (e.g. B2), you can apply an optional parameter to get the second, third, etc. (e.g. B3).