+ Reply to Thread
Results 1 to 6 of 6

Delete the last 2 digits

  1. #1
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151

    Delete the last 2 digits

    Hi guys

    I have a long list of 4 digit numbers:

    e.g.

    0234
    2434
    6566
    4566
    6785

    But I only want the first 2 digits (I need the last two digits deleted). I don't want to just divide by 1000 as this will leve me with a decimal. The numbers are in text format as some of them begin with a 0.

    So it would be:

    02
    24
    65
    45
    67

    Is there a formula to do this?

    Thanks very much

    Chris

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    Try,
    =LEFT(A1,2)

  3. #3
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151

    New problem

    Thanks

    That worked perfectly. Now I have a new problem.

    I have two tabs. The first tab includes 8000+ rows with one column. In each cell is the two digit number.

    In the other tab is the list of 99 2 digit numbers and in another column is each 2 digit numbers definition.

    e.g

    01 Agriculture

    I need a formula that puts the definition from tab 2 into tab 1.

    Is this possible?

    Thankyou very much for the advice.

    Chris

  4. #4
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re :Delete the last 2 digits

    Combining it with the previous answer we simple add a VLOOKUP()
    Please Login or Register  to view this content.
    where the second tab = Sheet2
    Column A has all the 2 digit numbers
    Column B has the explinations
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  5. #5
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Chris

    =VLOOKUP(FirstTab!A2,SecondTab!$A$2:$B$100,2,0)

    copied down.
    Richard Schollar
    Microsoft MVP - Excel

  6. #6
    Forum Contributor
    Join Date
    07-28-2005
    Posts
    151

    Thankyou

    very much, you've saved me so much time

+ 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