• 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.

Extract from a string

lwilt

Member
Hi,

I'm trying to be able to pull out a number from column G in the attachment. What I'm needing is whenever there is not a 9 digit number in column D beginning with 100,it comes over as a text field of the server btw, then it searches column G for that number. In column G that number always follows the phase Web Order with a ending space. I'm having trouble getting it to search for the length and beginning sequence before it goes into G to find the missing number.

Appreciate the help.
 

Attachments

  • ex.file.xlsx
    9.1 KB · Views: 9
Hi, lwilt!
I don't know if I understood you but try this in H2 and copy down:
=SI.ERROR(SI(SI(ESNUMERO(VALOR(D2));SI(Y(VALOR(D2)>=10^8;VALOR(D2)<10^8+10^6);0;1);1)=0;D2;EXTRAE(G2;HALLAR("Web Order ";G2)+10;9));"Not found") -----> in English:
=IFERROR(IF(IF(ISNUMBER(VALUE(D2)),IF(AND(VALUE(D2)>=10^8,VALUE(D2)<10^8+10^6),0,1),1)=0,D2,MID(G2,SEARCH("Web Order ",G2)+10,9)),"Not found")
If works fine, please remember to post solution or link where crossposted. Thank you.
Regards!
 
Last edited:
Hi to all!

Another way:
=IFERROR(IF(AND(COUNTIF(D2,"100??????"),1-ISERR(--D2)),--D2,--MID(G2,10+SEARCH("Web Order ",G2),9)),"Not Found")

Blessings!
 
Hi, lwilt!
Glad you solved it. Thanks for your feedback and welcome back whenever needed or wanted.
Regards!
 
Back
Top