Find/Extract number from a string

S

Sarah

Does anyone know how I would programatically extract the second instance of a
number in this given string?

Robot dispenses bead 6.00 diameter (mm), 1000.00 distance (mm)

The second number would be 1000.00 and will vary. This will not always be
the value, but it will always be the second number in the string.

Thank you.

Sarah
 
J

Jerry Whittle

Is the string mostly the same? Is there always the word "distance" for example?
 
K

KARL DEWEY

Try this --
Expr1: Val(Mid([Urtext],InStr([Urtext],"),")+3,InStrRev([urtext],"distance")))
 
S

Sarah

Thanks! That worked great.

KARL DEWEY said:
Try this --
Expr1: Val(Mid([Urtext],InStr([Urtext],"),")+3,InStrRev([urtext],"distance")))
--
KARL DEWEY
Build a little - Test a little


Sarah said:
Yes the only thing that changes are the 2 numbers (6.00 and 1000.00).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top