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

Extracting second number from text thread

Ronak Parekh

New Member
Hello,

I have more than 1000 text string as below;

Backfill Partial Audit Error Fixes for Central Bank of Belize 4558440 545614

Now in the end of the string there are two different values and both of them are to be used for different purpose. "4558440" and "545614"

Thus is it possible to extract those two values in different cells using right function. Challenge over here is that both the numbers would have different numbers of digit in different rows.
 
Ronak,

Welcome to the forums.

Assuming your original string is in A1

I would paste the following formula in B1:

=LEFT(TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",256)),256+256)),FIND(" ",TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",256)),256+256)))-1)

And the following formula in C1:

=MID(TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",256)),256+256)),FIND(" ",TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",256)),256+256)))+1,256)

Does this achieve your objective?
 
Last edited:
Hi,

There's are lot's of way to get it.

B1 =TRIM(LEFT(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99*2),99))
C1 =TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99))
 
Back
Top