+ Reply to Thread
Results 1 to 2 of 2

Uk Mobile Telephone Numbers

  1. #1
    Forum Contributor
    Join Date
    02-09-2007
    Location
    UK
    MS-Off Ver
    2019 & 365
    Posts
    304

    Uk Mobile Telephone Numbers

    I have 4 columns of telephone numbers, both land line and mobile numbers mixed in together.

    The mobile numbers generally start with 077 or 078 or 079 however smetimes excel seems to ignor the leading zero and make them 77----.

    What I would like to do is find a way of flagging only the mobile numbers not the land line numbers and also fixing the leading zero problem where it is sometimes dropped.

    I cannot post an example here as it has personal data etc.

    The reason for doing this is to do an SMS mailshot to our customer but I only want to SMS mobile numbers, not landlines.

    Any ideas?

    Regards BVG

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Uk Mobile Telephone Numbers

    With formulas and native excel functions....

    in 4 separate available column, enter in the first column

    =IF(OR(LEFT(A1,3)={"077","078","079"}),A1,IF(OR(LEFT(A1,2)={"77","78","79"}),0&A1,""))

    this checks first that the first 3 digits are those you are lookiing for and if yes, copies it, else it assumes you want to check if the first 2 digits, and if they match the 2 digit codes, it adds a 0 in front of the number...... make sure this would work for your data.

    where A1 contains the top left most number in your original data.

    Copy over 4 columsn and down as far as needed.

    Then select the original 4 columns and go to Format|Cells and choose Text from the Number tab.

    Then copy the new 4 columns and go to A1 and then Edit|Paste Special and choose Values...

    then you can delete the 4 formula columns.

    Now select the original 4 columns and go to Format|Conditional formatting.

    Choose Formula Is and enter formula:

    =OR(LEFT(A1,3)="077",LEFT(A1,3)="078",LEFT(A1,3)="078")

    where A1 is again the top-left most cell in the selection.

    click Format and choose colour from Pattern tab.

    This highlights all numbers starting with your 3 criteria.
    Last edited by NBVC; 05-13-2010 at 12:56 PM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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