m

2. Re: cut string (2003)

<P ID="edit" class=small>(Edited by sdckapr on 09-Dec-05 14:47. Added PS)</P>Assuming they are always 2 place numbers:

<pre>=VALUE(MID(A1,SEARCH("% MeOH",A1)-2,2))</pre>

Steve

PS. If it can be 1,2,3 or more figures, but will always be sandwiched between "mg/L)/" and "% MEOH" you can use:
<pre>=VALUE(MID(A1,SEARCH("mg/L)/",A1)+6,SEARCH("% MeOH",A1)-SEARCH("mg/L)/",A1)-6))</pre>

3. Re: cut string (2003)

hi steve,
The possibilities are that the MeOH % will either be a 1 digit % or 2 digit % and always have MeOH after the amount. but not always have mg/L.
So your first solution works but as soo as i use only one % it gets a error. Do you know anything else that might work?

m

4. Re: cut string (2003)

=SUBSTITUTE(MID(A1,FIND("% MeOH",A1)-2,2),"/","") this might be a possibility works for me

5. Re: cut string (2003)

If you want the result to be a number, use

=1*SUBSTITUTE(MID(A1,FIND("% MeOH",A1)-2,2),"/","")

or

=VALUE(SUBSTITUTE(MID(A1,FIND("% MeOH",A1)-2,2),"/",""))

6. Re: cut string (2003)

ya that sounds good thanks

7. Re: cut string (2003)

I have tried the search command and then from there move back 3 to the left get the numbe with the % and cut the % of by a substitue function but no luck

Substitute("%",Right(Search(MeOH,statement)-3),statement),"")

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•