Search code examples
excelvbaexcel-formulaexcel-2007

Extract Mobile from Text


i have data with 4 mobile numbers and i want extract mobile numbers to separate columns

like i have data in column A with mobile numbers i want to extract mobile numbers to separate 4 columns like column B and column C and column D and column E

I have applied this formula to extract it's not done

=TRIM(MID(SUBSTITUTE(TRIM(MID($A1,MIN(FIND({1,2,3,4,5,6,7,8,9,0},$A1&1234567890)),999))," ",REPT(" ",999)),999*(COLUMN(A1)-1)+1,999))

See Image

i want to extract like this below image

See Image


Solution

  • Try the following in B1, and drag the formula to the right and down.

    =MID($A1,MIN(IFERROR(FIND(ROW(A$1:INDEX(A:A,10))-1,$A1,FIND(A1,$A1)+10),"")),10)
    

    Note 1; it's an array-formula and need to be confirmed through CtrlShiftEnter

    Note2; I assumed you'd have at least 10 characters before the 1st occurence of a phone number and not digits in your string other than those in your phone numbers.