|
I ran across an interesting function today, while browsing through the financial functions: DollarFR. This takes a decimal and a fractional index, and then returns a number that looks like a decimal, except that the part after the decimal is actually the number of fractions of the fractional index. E.g.,
DollarFR(1.125, 8) = 1.1 because 1.125 = 1 1/8. DollarFR(1.75, 4) = 1.3 because 1.75 = 1 3/4.
Now, suppose you made the fractional index 60.
DollarFR(1.25, 60) = 1.15 because 1.25 = 1 15/60.
Are you seeing the value? How about if I adjust the formatting a touch?
DollarFR(1.25, 60) = 1:15
This is a remarkably simple way to do the conversions from fractional hours to hours and minutes (or from fractional minutes to minutes and seconds). Given the number of FAQs I've seen to do that exact conversion, I'm surprised this hasn't come up before.
|