+ Reply to Thread
Results 1 to 8 of 8

Return last digit in cell as a number

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-09-2009
    Location
    Columbus. Ohio
    MS-Off Ver
    Excel 2000
    Posts
    199

    Return last digit in cell as a number

    I am trying to get a formula to return the last digit from a number in a cell as a number.

    If the cell (B3) contains a number such as 164 or 34 I want to return a value of 4 and have it be formated as a number.

    I have tried =RIGHT(B3,1) and it returns a 4 but I cannot get another formula to recognize it as a number. It shows up in the cell on the left side as text would and if I format it as a number nothing happens it is still on the left and the formula does not work.

    Thank you

    Jim O
    Last edited by Jogier505; 02-20-2010 at 06:45 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-23-2009
    Location
    Hampshire, UK
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    328

    Re: Return last digit in cell as a number

    Try
    =RIGHT(B3,1) + 0

  3. #3
    Forum Contributor
    Join Date
    09-09-2009
    Location
    Columbus. Ohio
    MS-Off Ver
    Excel 2000
    Posts
    199

    Re: Return last digit in cell as a number

    Huron,

    Thank you very much.
    The little things get you every time.

    JIm O

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Return last digit in cell as a number

    Or =MOD(B3, 10)
    Entia non sunt multiplicanda sine necessitate

  5. #5
    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: Return last digit in cell as a number

    Try

    =INT(RIGHT(B3,1))

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Return last digit in cell as a number

    and, for completion's sake

    =VALUE(RIGHT(A1,1))

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Return last digit in cell as a number

    btw you dont need to include 1 in right (or left) =right(a1) will do
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Return last digit in cell as a number

    Good point, Martin. Personally, I've made it a habit to spell out all function parameters. The little added typing effort often saves me a lot of guesssing and trying to figure out what the default value is, especially when I revisit a formula after a long 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