+ Reply to Thread
Results 1 to 8 of 8

Assistance With Mixed Decimal

  1. #1
    Registered User
    Join Date
    01-17-2014
    Location
    Fenton Missouri
    MS-Off Ver
    Excel 2007
    Posts
    54

    Assistance With Mixed Decimal

    I am looking for a way to take a mixed number (whole number with decimal), strip the whole number(s), leaving only the 2 digit decimal. The whole number portion can be 1 or more digits.

    Example..........start with 10.46............I want to be left with .46
    Example..........start with 128.32............I want to be left with .32

    Is there a a function or operator that will remove any and all whole numbers?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Assistance With Mixed Decimal

    Either this:

    ="."&RIGHT(A1,2)

    or this:

    =VALUE("."&RIGHT(A1,2))

    The latter will keep the result as a number rather than text.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Assistance With Mixed Decimal

    =A1-INT(A1)

    A1 = Your original number (10.46)

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: Assistance With Mixed Decimal

    Try

    =MOD(A1,1)

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Assistance With Mixed Decimal

    Actually I forgot to take negative integer into consideration. Try this formula instead.
    =A1-ROUNDDOWN(A1,0)

  6. #6
    Forum Expert
    Join Date
    05-01-2014
    Location
    California, US
    MS-Off Ver
    Excel 2010
    Posts
    1,795

    Re: Assistance With Mixed Decimal

    Quote Originally Posted by JieJenn View Post
    =A1-INT(A1)
    Quote Originally Posted by JieJenn View Post
    Actually I forgot to take negative integer into consideration. [....]
    =A1-ROUNDDOWN(A1,0)
    Or simply =A1-TRUNC(A1)

    Quote Originally Posted by JohnTopley View Post
    =MOD(A1,1)
    .... Which is equivalent to =A1-INT(A1). Note JieJenn's "aha!" moment about negative numbers. Good catch!

    With all of these formulas, the problem is: if the formula is in A2, =A2=0.46 returns FALSE(!). You can see why by formatting A2 as Number with 16 decimal places (in case the fractional part is less than 0.10).

    I could explain the why reasonably succinctly, but in some detail; just ask. The shortest answer is: it has to do with the anomalies of 64-bit binary floating-point, which is how Excel represents numbers internally.

    More reliable:

    =ROUND(A1-TRUNC(A1),2)

  7. #7
    Registered User
    Join Date
    01-17-2014
    Location
    Fenton Missouri
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Assistance With Mixed Decimal

    thank you all so much for the assistance

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Assistance With Mixed Decimal

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Replies: 3
    Last Post: 08-28-2013, 08:45 AM
  2. [SOLVED] Calculating decimal places in a non decimal format (ie sixes not tens)
    By Mike Brewer in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-07-2013, 08:58 AM
  3. Replies: 2
    Last Post: 06-29-2012, 07:52 PM
  4. Conversions of Decimal Feet to Decimal Inches - Formula??
    By shubhamdev in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-15-2012, 01:27 PM
  5. Paste two decimal number in excel without extra decimal places appearing
    By jeffery_frick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2009, 07:49 PM
  6. Replies: 3
    Last Post: 07-05-2006, 01:57 PM
  7. Replies: 3
    Last Post: 03-18-2006, 02:25 PM
  8. [SOLVED] FIXED 2 DECIMAL PLACES, MUST ENTER ALL ZEROES AFTER DECIMAL POINT.
    By SUKYKITTY in forum Excel General
    Replies: 3
    Last Post: 07-06-2005, 09:05 AM

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