+ Reply to Thread
Results 1 to 4 of 4

Delete everything except last 9 digits

  1. #1
    Registered User
    Join Date
    02-06-2015
    Location
    USA
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    2

    Delete everything except last 9 digits

    I am pulling information out of a database and pasting it in Excel (Office Pro Plus 2010). I get 6 columns of info. I need to get 2 of the columns formatted to paste on another sheet. 1 column has part numbers formatted like this :

    ...1....123456789
    ......2....123456789
    .........3....123456789

    I need to delete everything except the last 9 digits all the way down the column so I can copy and paste a neat column with just the last 9 digits. I just went through ~1000 cells deleting the ...1.... and ......2.... etc. My fingers hurt. I have to do this 10,000 more times. Is there a better way to automate this process ?

    Very new to Excel.......please be nice.

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Delete everything except last 9 digits

    You can use RIGHT() to pull a determined amount of characters from a string, and use those number values later. It would look something like this (assuming your data starts in A1)

    Please Login or Register  to view this content.
    Drag down to fill.

    You can then copy/paste those values over. Will that work?
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Delete everything except last 9 digits

    Put this formula in a helper column (e.g. in G1 if your data occupies 6 columns and the data starts in cell A1):

    =RIGHT(A1,9)

    then copy down. A quick way of doing this is to double-click the fill handle (the small black square in the bottom right corner of the cursor, with G1 selected). If you want those digits to be proper numbers, then make the formula:

    =RIGHT(A1,9)*1

    Then you can fix the values (using <copy>, <Paste special> | Values | OK | <Esc> ) then you can copy and paste those values to over-write the values in column A, and then you can delete column G.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    02-06-2015
    Location
    USA
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    2

    Re: Delete everything except last 9 digits

    Perfect. This works exactly as I need it to. Thanks for the quick replies and the help. My fingers will live a little longer now. Have a great weekend !

+ 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. Delete digits within brackets
    By ambharat in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-15-2013, 04:09 AM
  2. Delete the last 2 digits
    By cj21 in forum Excel General
    Replies: 5
    Last Post: 11-11-2008, 10:02 AM
  3. how to delete the 4 rightmost digits from a cell
    By charlene in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-29-2006, 10:15 AM
  4. Delete 4 to 5 digits from left in a cell
    By saziz in forum Excel General
    Replies: 8
    Last Post: 04-27-2006, 03:25 PM
  5. [SOLVED] Delete first two digits in column
    By rjtees in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-17-2005, 05:25 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