in the calc cells if I enter 9/100 it shows 8/89. Any one please tell how to fix this problem.
Thanks a lot for your help.
in the calc cells if I enter 9/100 it shows 8/89. Any one please tell how to fix this problem.
Thanks a lot for your help.
What is your locale, what your UI language, what your OS, what you OS language/locale, what your LibO version? Even knowing all that I might not have help for you. Without this information it’s hopless. My LibO doesn’t behave that way. Down with silly "recognition!
Go to the “Format Cells” as shown by Alex Kemp. Then select Fractions on left side. You will see in the middle column 2 predefined formats: # ?/? and # ??/??. select the second one ( where it says now General you will see it) and modify it to # ??/???.
Then you get your right display.
ADDON: My solution is only good for the actual session. LO does not save the fraction anywhere, so it gets lost after saving and reopening. Although it saves other user-defined formats (had some phone number saved in the test file and there were still ok). I might have to write a bugreport.
2.ADDON: There is already a bug#88657 filed beginning of 2015. One workaround found and confirmed by me is to use
“# ???/???” as format. This works to and is saved.
Custom format codes not correctly saved / reloaded while first working as expected, are not restricted to ‘Fraction’ based formats.
If you decide to file a bug report: Would you mind to also post a link to it, here?
Hi GA316
The normal reason for wrong display of numbers containing a slash (’/’) as reported in ask.libo is that the default for Calc for the questioner is to format as a date. The reason in your case is a variant upon that, and for me has revealed a truly abominable piece of coding…
With Calc, each cell is rather like a human being:- there is the body & there are the clothes (display). Sometimes one matches the other, and sometimes not. Also, small boys have a habit of hiding things in their pockets (preciousss).
With the cursor within the cell containing ‘9/100’, try the following:
- (
menu
):Format
→Clear Direct Formatting
(Ctrl+M
)
(from now on you will see the default format)
menu
):Format
→Cells
(Ctrl+1
)Format code
?)Number
→General
, and the display showed for me as “9/100”)Fraction
→"# ??/??"
then showed your result of 8/89 - hooray!)Format code
to "# ??/???"
If this helps then please tick the answer ()
…and/or show you like it with an uptick (∧)
(Edited)
You ( @GA316 ) had formatted the respective cell(s) using a format code like “# ?/??” or “# ?/#?” for fractions up to 2 digits for the denominator. 8/99 is the best approximation for 9/100 available if the denominator is limited to 2 digits.
Generally you shouldn’t expect reliable results displayed using ‘Fraction’ format. The arithmetic is always ‘Double’. Applying an algorithm of continued fractions afterwards is kind of a hoax. If you need exact fractional arithmetic you have to use mathematics software. (Maxima is free now.)
The fact that the number format ‘Fraction’ set for a cell also causes the “recognition” of “9/100” as not text can be seen as an inconsistency. This behaviour may get in conflict with a ‘date acceptance pattern’. Presently it will even override it. Did anyone at anytime specify the bahaviour of such toys?
(Editing again:)
@Horst may have a look into the attached example. I did, however, not yet demonstrate similar effects with non-fractional formats. (No examples stored formerly) ask59529FractionTests.ods
Additionally to answer by @horst:
You can also choose an Fractionsformatcode like # ??/100
to fix the denominator for some Reasons