+ Reply to Thread
Results 1 to 10 of 10

Fractional part of decimals?

  1. #1
    Zerex71
    Guest

    Fractional part of decimals?

    Greetings,

    I thought for sure there was a way to do this but the Excel help does
    not tell me. I have number which I would like to take the fractional
    part of (if x = 10.48, f(x) = 0.48). Is there a function to do this?

    Mike


  2. #2
    Chip Pearson
    Guest

    Re: Fractional part of decimals?

    Try something like

    =A1-INT(A1)


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Zerex71" <mfeher@stny.rr.com> wrote in message
    news:1151526804.724493.58270@p79g2000cwp.googlegroups.com...
    > Greetings,
    >
    > I thought for sure there was a way to do this but the Excel
    > help does
    > not tell me. I have number which I would like to take the
    > fractional
    > part of (if x = 10.48, f(x) = 0.48). Is there a function to do
    > this?
    >
    > Mike
    >




  3. #3
    Registered User
    Join Date
    05-23-2006
    Posts
    58

    truncate

    f(x)=x-TRUNC(x) should do the trick (insert Cell reference for x).
    Last edited by Spreadsheet; 06-28-2006 at 04:48 PM.

  4. #4
    Forum Contributor
    Join Date
    06-01-2006
    Posts
    324
    I am not sure if there is a function for it.. but you can use this..

    =RIGHT(A1, SEARCH(".",A1))
    Google is your best friend!

  5. #5
    Chip Pearson
    Guest

    Re: Fractional part of decimals?

    A better formula that will work properly with negative numbers
    would be

    =A1-TRUNC(A1)


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Zerex71" <mfeher@stny.rr.com> wrote in message
    news:1151526804.724493.58270@p79g2000cwp.googlegroups.com...
    > Greetings,
    >
    > I thought for sure there was a way to do this but the Excel
    > help does
    > not tell me. I have number which I would like to take the
    > fractional
    > part of (if x = 10.48, f(x) = 0.48). Is there a function to do
    > this?
    >
    > Mike
    >




  6. #6
    Peo Sjoblom
    Guest

    Re: Fractional part of decimals?

    =MOD(cell,1)

    --

    Regards,

    Peo Sjoblom

    Excel 95 - Excel 2007
    Northwest Excel Solutions
    www.nwexcelsolutions.com
    "It is a good thing to follow the first law of holes;
    if you are in one stop digging." Lord Healey


    "Zerex71" <mfeher@stny.rr.com> wrote in message
    news:1151526804.724493.58270@p79g2000cwp.googlegroups.com...
    > Greetings,
    >
    > I thought for sure there was a way to do this but the Excel help does
    > not tell me. I have number which I would like to take the fractional
    > part of (if x = 10.48, f(x) = 0.48). Is there a function to do this?
    >
    > Mike
    >




  7. #7
    Zerex71
    Guest

    Re: Fractional part of decimals?

    That did it! Thanks! I totally didn't think to do that. What I am
    trying to do is take a number, any number, and cut it down in such a
    way as to get it to a decimal between 1.0-2.0, because I have values
    for the gamma function between 1.0 and 2.0, though I can count
    up/extrapolate using the known formula for subsequent gamma function
    values. In other words, since I don't have values for the gamma
    function outside of 1.0-2.0, I am recalculating successive gammas, but
    I start with a number well outside of 1.0-2.0 range. Make sense? (So
    if the desired x for the gamma function is 10.48, I want to cut it down
    to start at 1.48; if x = 5.11, I want the number to be 1.11.)

    Mike

    Spreadsheet wrote:
    > f(x)=x-TRUNC(x) should do the trick (insert Cell reference for x).
    >
    >
    > --
    > Spreadsheet
    > ------------------------------------------------------------------------
    > Spreadsheet's Profile: http://www.excelforum.com/member.php...o&userid=34730
    > View this thread: http://www.excelforum.com/showthread...hreadid=556668



  8. #8
    Dana DeLouis
    Guest

    Re: Fractional part of decimals?

    > .... In other words, since I don't have values for the gamma
    > function outside of 1.0-2.0, I am recalculating successive gammas...


    Don't know if this will help, so I'll just throw it out...

    Function Gamma(x)
    Gamma = Exp(WorksheetFunction.GammaLn(x))
    End Function

    --
    HTH. :>)
    Dana DeLouis
    Windows XP, Office 2003


    "Zerex71" <mfeher@stny.rr.com> wrote in message
    news:1151529518.573194.302610@d56g2000cwd.googlegroups.com...
    > That did it! Thanks! I totally didn't think to do that. What I am
    > trying to do is take a number, any number, and cut it down in such a
    > way as to get it to a decimal between 1.0-2.0, because I have values
    > for the gamma function between 1.0 and 2.0, though I can count
    > up/extrapolate using the known formula for subsequent gamma function
    > values. In other words, since I don't have values for the gamma
    > function outside of 1.0-2.0, I am recalculating successive gammas, but
    > I start with a number well outside of 1.0-2.0 range. Make sense? (So
    > if the desired x for the gamma function is 10.48, I want to cut it down
    > to start at 1.48; if x = 5.11, I want the number to be 1.11.)
    >
    > Mike
    >
    > Spreadsheet wrote:
    >> f(x)=x-TRUNC(x) should do the trick (insert Cell reference for x).
    >>
    >>
    >> --
    >> Spreadsheet
    >> ------------------------------------------------------------------------
    >> Spreadsheet's Profile:
    >> http://www.excelforum.com/member.php...o&userid=34730
    >> View this thread:
    >> http://www.excelforum.com/showthread...hreadid=556668

    >




  9. #9
    Zerex71
    Guest

    Re: Fractional part of decimals?

    Thanks for the tip. I think I tried something similar, and/or read
    about that function in Excel, and it really wasn't going to give me
    what I need. Gamma functions are mysterious and as such, I just ended
    up using a tabulation of the gamma function for values between 1.0-2.0,
    and because there is a way to predict values outside of that range, I
    used it to do what I was looking for. I believe it just might have
    worked but I'm not certain.

    Mike

    Dana DeLouis wrote:
    > > .... In other words, since I don't have values for the gamma
    > > function outside of 1.0-2.0, I am recalculating successive gammas...

    >
    > Don't know if this will help, so I'll just throw it out...
    >
    > Function Gamma(x)
    > Gamma = Exp(WorksheetFunction.GammaLn(x))
    > End Function
    >
    > --
    > HTH. :>)
    > Dana DeLouis
    > Windows XP, Office 2003
    >
    >
    > "Zerex71" <mfeher@stny.rr.com> wrote in message
    > news:1151529518.573194.302610@d56g2000cwd.googlegroups.com...
    > > That did it! Thanks! I totally didn't think to do that. What I am
    > > trying to do is take a number, any number, and cut it down in such a
    > > way as to get it to a decimal between 1.0-2.0, because I have values
    > > for the gamma function between 1.0 and 2.0, though I can count
    > > up/extrapolate using the known formula for subsequent gamma function
    > > values. In other words, since I don't have values for the gamma
    > > function outside of 1.0-2.0, I am recalculating successive gammas, but
    > > I start with a number well outside of 1.0-2.0 range. Make sense? (So
    > > if the desired x for the gamma function is 10.48, I want to cut it down
    > > to start at 1.48; if x = 5.11, I want the number to be 1.11.)
    > >
    > > Mike
    > >
    > > Spreadsheet wrote:
    > >> f(x)=x-TRUNC(x) should do the trick (insert Cell reference for x).
    > >>
    > >>
    > >> --
    > >> Spreadsheet
    > >> ------------------------------------------------------------------------
    > >> Spreadsheet's Profile:
    > >> http://www.excelforum.com/member.php...o&userid=34730
    > >> View this thread:
    > >> http://www.excelforum.com/showthread...hreadid=556668

    > >



  10. #10
    Titus
    Guest

    Re: Fractional part of decimals?

    try this,
    =IF(INT(cell>1),1+(MOD(cell,1)),MOD(cell,10))


+ 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