+ Reply to Thread
Results 1 to 7 of 7

Extract a mobile number from string AND remove the spaces?

  1. #1
    Registered User
    Join Date
    02-27-2008
    Posts
    16

    Extract a mobile number from string AND remove the spaces?

    I have thousands of these that need cleaning from a very poor dataset.

    Examples:

    01695 557086 07976 064 189
    01689/ 608455/07818 030821


    I need to extract just the UK mobile phone number so my result looks like this:

    07976064189
    07818030821

    Can that be easily done?

    Thanks in ad

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Extract a mobile number from string AND remove the spaces?

    This will work based on your sample.

    Try:

    =RIGHT(SUBSTITUTE(A1," ",""),11)

  3. #3
    Registered User
    Join Date
    02-27-2008
    Posts
    16

    Re: Extract a mobile number from string AND remove the spaces?

    Wow, fast reply, thanks so much that worked perfectly!

  4. #4
    Registered User
    Join Date
    02-27-2008
    Posts
    16

    Re: Extract a mobile number from string AND remove the spaces?

    How would I modify this formula to account for the following example please:

    0121 555 6011 07739 065138

    This has 2 spaces in the mobile number so I would the formula you posted above to remove both single, and double spaces too.

  5. #5
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Extract a mobile number from string AND remove the spaces?

    You're welcome, happy to help.

    The formula from post #2 removes all spaces regardless of how many there are or if they are single, double, triple, etc.

  6. #6
    Registered User
    Join Date
    02-27-2008
    Posts
    16

    Re: Extract a mobile number from string AND remove the spaces?

    Excellent thanks again, my workbook is so large that it took a while to process everything. Your formula works just how you described!

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Extract a mobile number from string AND remove the spaces?

    You're welcome. Happy to help.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Remove or extract the first 4 spaces in a cell see example
    By gamurphy64 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-21-2016, 05:23 PM
  2. [SOLVED] How to remove leading spaces from a VBA string?
    By jmccoughlin in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-05-2015, 07:56 PM
  3. [SOLVED] Remove Spaces and Hyphens in a Tet String
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-05-2013, 06:02 PM
  4. [SOLVED] Can't remove excessive spaces within a string
    By dschmitt in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 06-26-2012, 04:58 AM
  5. Remove Spaces From Right End Of String
    By goss in forum Excel General
    Replies: 5
    Last Post: 05-05-2012, 04:52 AM
  6. [SOLVED] Remove Spaces from string
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-06-2012, 10:41 AM
  7. Remove the spaces in the last string
    By seanyeap in forum Excel General
    Replies: 3
    Last Post: 08-03-2010, 12:49 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