+ Reply to Thread
Results 1 to 5 of 5

modify column values that starts with 1

  1. #1
    Registered User
    Join Date
    07-22-2005
    Location
    canada
    Posts
    73

    modify column values that starts with 1

    Hello,

    I am attempting to filter a 60,000+ column of phone numbers, and all I am trying to do, is run a macro that removes the 1 at the start of any numbers that have it. some do, many do not have it.

    example :

    original value : 18005551212

    desired value : 8005551212

    Is their a fast way to do this?

    I am kinda clueless where to start with a macro like this.

    thanks in advance,

    spyrule.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    If the numbers with a 1 in front are all 11 digits long, then with a formula

    =IF(LEN(A1)=11,RIGHT(A1,10)*1,A1) copied down
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon spyrule

    You could use this formula, in a spare column - once that is done you could use Copy > Paste Special, paste as values over original range.

    =IF(LEFT(A1,1)="1",RIGHT(A1,LEN(A1)-1),A1)

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi dominicb,

    So that they all format the same way, suggest

    =IF(LEFT(A1,1)="1",RIGHT(A1,LEN(A1)-1),A1)*1

  5. #5
    Registered User
    Join Date
    07-22-2005
    Location
    canada
    Posts
    73
    thank you very much. It's really apreciated.

+ 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