• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Extraction of numbers from string

tomas

Active Member
Hi

in attached file there are strings and in columns d:f I hardcoded what I want to extract from strings. I want to accomplish this with formula. Basically a want numbers before first second and third occurance of "p", numbers can have 2 digits and if numbers our enclosed in parenthesis I dont want them.

Thank you
 

Attachments

  • extraction from string.xlsx
    8.1 KB · Views: 12
With your posted data following formula will work.

Put in cell D2 and then copy down and across.
=TRIM(RIGHT(SUBSTITUTE(TRIM(MID(SUBSTITUTE("p"&$A2,"p",REPT(" ",99)),COLUMNS($D$1:D1)*99,99)),")",REPT(" ",99)),99))
 
Back
Top