+ Reply to Thread
Results 1 to 9 of 9

Phone numbers to extract

Hybrid View

mikebonyad Phone numbers to extract 01-11-2014, 12:28 PM
Jakobshavn Re: Phone numbers to extract 01-11-2014, 12:56 PM
mikebonyad Re: Phone numbers to extract 01-11-2014, 01:12 PM
Jakobshavn Re: Phone numbers to extract 01-11-2014, 01:41 PM
AlKey Re: Phone numbers to extract 01-11-2014, 01:21 PM
mikebonyad Re: Phone numbers to extract 01-11-2014, 01:50 PM
AlKey Re: Phone numbers to extract 01-11-2014, 02:00 PM
mikebonyad Re: Phone numbers to extract 01-13-2014, 11:56 AM
bebo021999 Re: Phone numbers to extract 01-13-2014, 12:14 PM
  1. #1
    Registered User
    Join Date
    01-11-2014
    Location
    Costa Rica
    MS-Off Ver
    Excel 2007
    Posts
    6

    Phone numbers to extract

    Hello All,

    I have a report coming from a phone system which more or less looks like this:
    Sorry. Your message to phone number 215-555-2210 could not be delivered. Your recipient did not answer or might be busy. Please try again later.


    I need to extract the phone number and put it in a separate column to be able to block future calls to.

    I tried different forumlas to no avail.

    Any help would greatly be appreciated.

    Thanks,
    Mike
    Last edited by mikebonyad; 01-13-2014 at 12:58 PM.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Phone numbers to extract

    With a sentence in cell A1, use the following array formula:

    =MID(A1,MATCH(TRUE,ISNUMBER(1*MID(A1,ROW($1:$999),1)),0),12)

    An array formula is entered with CNTRL-SHFT-ENTER rather than just the ENTER key.

    (In the Formula Bar, the formula should appear surrounded by braces)
    Last edited by Jakobshavn; 01-11-2014 at 01:43 PM. Reason: Fix Bug
    Gary's Student

  3. #3
    Registered User
    Join Date
    01-11-2014
    Location
    Costa Rica
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Phone numbers to extract

    Thank you for the quick reply. I did this and excel turns #N/A as result.

    Any ideas

    Thanks,
    Mike

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Phone numbers to extract

    Your sentence may be long.......Use this instead:

    =MID(A1,MATCH(TRUE,ISNUMBER(1*MID(A1,ROW($1:$999),1)),0),12)


    See the attached working example:
    Attached Files Attached Files

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Phone numbers to extract

    Try this one

    =MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),12)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Registered User
    Join Date
    01-11-2014
    Location
    Costa Rica
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Phone numbers to extract

    Worked just fine, thank you very much,

  7. #7
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Phone numbers to extract

    Thanks for the feedback!

    Please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

  8. #8
    Registered User
    Join Date
    01-11-2014
    Location
    Costa Rica
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Phone numbers to extract

    Just an additional question to this. What if there are 3 or 4 letters before the digits and I need to bring those alphabetical letters that are attached to the number over as well? For example:

    This guy called ABS123 and asked for you to call back.
    Customer number BBT2356 wants you to delete his last order.

    Thanks,

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,645

    Re: Phone numbers to extract

    Try:
    =TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",255)),SEARCH({1,2,3,4,5,6,7,8,9,0},SUBSTITUTE(A1," ",REPT(" ",255)))-255,500))
    Quang PT

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro or Function to extract phone numbers and emails from a string
    By jz789 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2013, 10:32 PM
  2. [SOLVED] Macro or Function to extract phone numbers and emails from a string
    By jz789 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2013, 10:31 PM
  3. How do I extract phone numbers from various formats?
    By mcbruce76 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-11-2012, 03:36 PM
  4. extract phone numbers to new columns
    By misterzr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2011, 05:09 PM
  5. Extract Address and phone numbers
    By donlincolnef in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-15-2010, 12:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1