Hi,
I have dirty data of various length but maximum=18 characters. There are alphabets,-’s number combinations.
Eg:
21980760-XS2678
BB123830
9009
BB-10-24-900
lc1319038
I need the first 8 numbers from the text. I do not need numbers that appear second time after the alphabets. If there are not 8 (eg: 9009/lc1319038) I need to append 0’s in the front to make it 8 characters in length.
I used this formula
=--LEFT(LOOKUP(99^99,--(“0”& MID(A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9} A2 &”0123456789”)),ROW(1:10000))),8)
However it does not work for the BB-10-24-900 type text format. Please help !
I have dirty data of various length but maximum=18 characters. There are alphabets,-’s number combinations.
Eg:
21980760-XS2678
BB123830
9009
BB-10-24-900
lc1319038
I need the first 8 numbers from the text. I do not need numbers that appear second time after the alphabets. If there are not 8 (eg: 9009/lc1319038) I need to append 0’s in the front to make it 8 characters in length.
I used this formula
=--LEFT(LOOKUP(99^99,--(“0”& MID(A2,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9} A2 &”0123456789”)),ROW(1:10000))),8)
However it does not work for the BB-10-24-900 type text format. Please help !