View Single Post
  #12   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default Extract Fractional Numbers as Numbers NOT Date

On Wed, 2 Nov 2005 14:03:05 -0800, "CADManBill"
wrote:

I guess I should have been more detailed in my example.
Fact is that I have many strings similar to the example that need to be
extracted and calculated the same way. But the characters leading and
trailing the "/" differ.

More Defined Example of Strings
A1 PL3/8x5
B1 PL3/8x5 1/2
C1 PL1 1/2x3
D1 PL1 1/2x3 1/2
E1 PL13/16x15/16
On... and On...

The suggested formulas only consider One character on each side of the "/".
Basically, if the "PL" was replaced with"=" and the "x" replaced with "*" it
would look like what I an trying to accomplish.

Please excuse the name change, Earlier I was using my account at work and
now my account at home.


Another option would be to download and install Longre's free morefunc.xll
add-in from http://xcell05.free.fr/

You could then use these "regular expression" formulas:

1st Fractional Number: =REGEX.MID(A1,"(\d+\s)?\d+(/\d+)?",1)
2nd Fractional Number: =REGEX.MID(A1,"(\d+\s)?\d+(/\d+)?",2)

Product of the two:

=EVAL(REGEX.MID(A1,"(\d+\s)?\d+(/\d+)?",1)&"*"&REGEX.MID(A1,"(\d+\s)?\d+(/\d+)?",2))



--ron