+ Reply to Thread
Results 1 to 13 of 13

extract digits from a cell

  1. #1
    Registered User
    Join Date
    02-19-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    5

    extract digits from a cell

    hi i have a column filled with 13 digit numbers and i am looking to remove 5 digits from that number e.g 5020073417357 i need to remove 41735 (8 to 12) from every one in the column.
    Last edited by andywil; 02-20-2013 at 01:20 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,603

    Re: extract digits from a cell

    Assuming that's text rather than a number, this should work:

    =LEFT(A2,8)&RIGHT(A2,1)


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: extract digits from a cell

    Also,

    =REPLACE(A2,9,5,"")
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,603

    Re: extract digits from a cell

    @Haseeb: I did not know that. Thank you. Much neater.

    Regards, TMS

  5. #5
    Registered User
    Join Date
    02-19-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: extract digits from a cell

    thanks for the help guys but it is not leaving the numbers i need e.g 5020073356564 in need 35656 from this dont need the first 7 5020073 or the last number 4 only need 35656 from it thanks

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: extract digits from a cell

    Hi andywil

    Assuming your data is in column A, A1. in B1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Kevin UK; 02-20-2013 at 01:32 PM.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: extract digits from a cell

    Try this, it returns a number, not a string.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Marcol; 02-20-2013 at 02:12 PM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  8. #8
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: extract digits from a cell

    @ Marcol

    Yes forgot that!

    Updated:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    02-19-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: extract digits from a cell

    thanks guys worked a treat now how can insert the formula so it will do this for a column of 20 rows removing the 5 digits i require for each 13 digit number in the rows

  10. #10
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: extract digits from a cell

    Hi andywil

    Assuming Data is in A1:A20, put the formula in say B1 and copy down.

  11. #11
    Registered User
    Join Date
    02-19-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: extract digits from a cell

    thanks for all the help guys great forum
    Last edited by andywil; 02-20-2013 at 03:47 PM.

  12. #12
    Registered User
    Join Date
    02-19-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: extract digits from a cell

    can i replace the 13 digit number from the rows with the extracted 5 digit number into the original rows

  13. #13
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: extract digits from a cell

    Hi andywil

    Copy the column/cells with the extracted values, select the column/cells of the original data, paste special, paste values.

+ 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