+ Reply to Thread
Results 1 to 5 of 5

Trouble pulling a string of numbers due to it being a decimal...

  1. #1
    Registered User
    Join Date
    05-16-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    Trouble pulling a string of numbers due to it being a decimal...

    The problem I'm having is that I want a cell (A5) to equal the final 2 numbers of another cell (D2). I tried using the =right fx, and the =mid(find) fx. I'm running into a problem because the two digits I'm trying to pull are part of a decimal (1.060). So I want A5 to equal 60, but instead it just keeps giving me 6 or 06. If I change 1.060 to 1.063 it adjusts and gives me 63.

    Any ideas on how to tell Excel to give me that zero?

    Thanks!
    -Dave

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Trouble pulling a string of numbers due to it being a decimal...

    Are the numbers always out to 3 decimal places?
    Last edited by Tony Valko; 05-16-2013 at 10:06 PM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Trouble pulling a string of numbers due to it being a decimal...

    Hello and welcome to the forum,

    Maybe this formula is what you are looking for
    =RIGHT(TEXT(C1,"#.##0"),2)

    This formula works assuming you have at most 3 digits after the decimal. So 1.06, 1.060 and 129318293.06 will all returns the value of 60.

    And of course for the case 1.063, it will return 63.

    Note that the question on post #2 from Tony Valko is very important, because if you enter a number with more than 3 digits after the decimal, it will only take the second and third digit after the decimal.
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  4. #4
    Registered User
    Join Date
    05-16-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Trouble pulling a string of numbers due to it being a decimal...

    Perfect - Thanks!

  5. #5
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Trouble pulling a string of numbers due to it being a decimal...

    Glad that I could help.

    If you have found a fitting solution to your problem, please mark the Thread as [SOLVED] using the Thread Tools right above post #1. It keeps things neat and tidy.

    And don't hesitate if you have any question.

    Have a great day.

+ 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