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

Bank Reference Number

Shabbo

Member
Dear Sir,
I have data like in column A and expected result in Column B.
 

Attachments

  • Bank Reference Number.xlsx
    8.3 KB · Views: 16
Shabbo
You really should reread Forum Rules
as I have asked many times.

Eg below:
How to get the Best Results at Chandoo.org
  • Use Relevant words in the Title and in the tag Box, This will aid future searches.
  • When drafting a question, try and lay out the question in a clear and concise way.
  • Try and tell the readers what is the situation, what have you tried and what do you want to achieve.
  • Don't leave out information more info is better
 
There is a logic in the three last examples, but not for A2? Please explain the logic
Hi pecoflyer,

The logic is to split the data with delimiter "-" or "/" and extract the 1st group of alphanumeric or numeric value. Please see my formula solution.

I think this is not possible as the strings are different also the length of the Reference number is not unique.

The "Reference Number" could be extracted by >>

In C2, formula copied down :

=TRIM(LEFT(SUBSTITUTE(SUBSTITUTE(MID(A2,LOOKUP(99,FIND("/",SUBSTITUTE(LEFT(A2,MIN(FIND({0,1,2,3,4}+{0;5},A2&1/17))),"-","/"),ROW($1:$99)))+1,99),"-","/"),"/",REPT(" ",99)),99))

68237

Or,

You could use this shorter formula, but it returned numeric value and removed all leading 0 >>

=FILTERXML("<a><b>"&SUBSTITUTE(SUBSTITUTE(A2,"-","/"),"/","</b><b>")&"</b></a>","//b[translate(.,'1234567890','')!=.][1]")

68238
 
Last edited:
Back
Top