Fractional part of decimals?

  • Thread starter Thread starter Zerex71
  • Start date Start date
Z

Zerex71

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
 
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
 
I am not sure if there is a function for it.. but you can use this..

=RIGHT(A1, SEARCH(".",A1))
 
=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
 
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
 
.... 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
 
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
 
Back
Top