Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default Rounding down and displaying as a fraction

I have a calculated number that I want to display to the ½ fraction. The
fraction format rounds up.
Even if I use the rounddown to get the number I want, when I format the cell
to the half fraction, it rounds my number back up again. Ive tried
increasing the decimal places of the original calculated number and that
doesnt help.

Im trying to calculate paid days earned (based on hours worked).

Even if you work enough hours to get 1.49999999999999 days, you dont get 1
½ days until you cross the 1.5 boundary.

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 905
Default Rounding down and displaying as a fraction

"Dianna Michelle" <Dianna wrote:
I have a calculated number that I want to display to the ½ fraction.
[....] Even if I use the rounddown to get the number I want, when I
format the cell to the half fraction, it rounds my number back up again.


I am thinking of a solution, but I won't tell you the details. How helpful
is that?

But that's effectively what you wrote: ``I calculate a number, but I won't
tell you what it is or how I calculate it. I tried a work-around using
ROUNDDOWN to get a number that I want, but I won't tell you exactly what I
did or what I want``. How useful is that?


Even if I use the rounddown to get the number I want, when I
format the cell to the half fraction, it rounds my number back
up again.
[....]
Even if you work enough hours to get 1.49999999999999 days,
you dont get 1 ½ days until you cross the 1.5 boundary.


On the one hand, you seem to be concerned that Fraction As 1/2s rounds the
number (up, in this case). On the other hand, you seem to be concerned that
it failed to, or so you say.

What exactly is your concern? Hint: Provide the details of a numerical
example.

Yes, the Fraction format rounds numbers to the nearest multiple of the
fraction. For example, with Fraction As 1/2s, any number between 1.25[*]
and 1.74999999999999 is displayed as 1 1/2.

So when I enter the constant 1.49999999999999 into a cell, Fraction As 1/2s
displays 1 1/2 as expected. I do __not__ have to "cross the 1.5 boundary".
That contradicts your observation above, unless you misspoke somehow.

If you are trying to say that you don't want 1 1/2 until the value is 1.5 or
larger, you must round down to the lowest multiple of 1/2 yourself. The
formula is:

=ROUNDDOWN(A1*2,0)/2

But does that address your problem? I really have no idea, since you were
unclear about the problem.


-----
Endnotes
[*] I said that 1.25 is formatted as 1 1/2. But be aware that some numbers
that Excel displays as 1.250...0 to 14 decimal places, are considered to be
less than 1.25 for the Fraction format; for example, =1.25-(2^-52) in A1.
Such numbers cannot be entered as constants, but they can arise as the
result of calculations. Apparently, the Fraction format does an exact
binary comparison, not a comparison of the value as it would be displayed
with 15 significant digits. You can simulate the same exact binary
comparison with the formula =A1-1.25=0. Note that the formula =A1=1.25,
which is mathematically equivalent, is not good enough because of Excel
heuristics that try to adjust "infinitesimal" differences.


----- original message -----

"Dianna Michelle" <Dianna
wrote in
message ...
I have a calculated number that I want to display to the ½ fraction. The
fraction format rounds up.
Even if I use the rounddown to get the number I want, when I format the
cell
to the half fraction, it rounds my number back up again. Ive tried
increasing the decimal places of the original calculated number and that
doesnt help.

Im trying to calculate paid days earned (based on hours worked).

Even if you work enough hours to get 1.49999999999999 days, you dont get
1
½ days until you cross the 1.5 boundary.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show fraction as fraction even if answer is 1 Vin Sukhadia Charts and Charting in Excel 1 December 2nd 09 07:51 PM
Text fraction to fraction format brownti via OfficeKB.com Excel Worksheet Functions 1 February 1st 08 02:38 PM
How do I change fraction to fraction characters? cmcqueary2806 Excel Worksheet Functions 1 November 2nd 06 09:58 PM
Time -Converting Rounding displaying Yeah Excel Discussion (Misc queries) 1 July 23rd 06 12:46 AM
Time -Converting Rounding displaying [email protected] Excel Discussion (Misc queries) 1 July 22nd 06 05:56 AM


All times are GMT +1. The time now is 01:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"