Hi folks,
This is my first post here on the forum.
Ok so I have a banking dataset with a 'description' field containing a random text string , in this string there is a 6 digit customer reference number Im trying to extract.
This 6 digit ref always has leading number 2, 3 or 4 and is USUALLY preceded by letters "ECN" (not always). It can appear anywhere in the string and can appear twice.
So it can look like
ECN412345
ECN 412345
ECN:412345
412345
etc
Examples of text string formats
BLAH UK LTD /RFB/ECN412345
B/O BLAH 1234/ECN412345 E2EID/NOTPROVIDED ECN412345
BLAH.COM 412345 44023345273216000N BLAH.COM 412345
BLAH TRAVEL LIMITED (NORTH /RFB/ECN:412345 BLAH TRAVEL
ECN412345
412345
etc
PS I found a useful formula on another thread ,
http://www.excelforum.com/excel-gene...xt-string.html
Ive tweaked it for 6 digits and it works but not in all scenarios
where A1 is text string cell,
=TEXT(LOOKUP(10^8,MID(SUBSTITUTE(A1," ","x"),ROW(INDIRECT("1:"&LEN(A1)-5)),6)+0),"000000")
All help appreciated thanks
N.
Bookmarks