PDA

View Full Version : [SOLVED] Issue with Excel Division of Fractions..Not showing correct results



enggrahul78
08-25-2019, 09:47 AM
Here is what I did..

Generated Random Fractions in Cell B and C and added the result in Cell D. I want it to give me traditional Fraction addition, like we do in school. But its giving weird results.

It is showing 26/29 + 0 = 68/75 !!!!!! Refer attached picture. It shall give me 26/29. (Sample Row 10)
It is showing 2/11 + 3/7 = 11/18 !!!!! Refer attached picture. It shall give me 47/77. (Sample Row 12)

Please let me how do i achieve traditional Fraction addition , subtraction , multiplication, division in Fractions ???

Kenneth Hobs
08-25-2019, 01:23 PM
Images don't help us help you. An Excel file would have helped us help you. As such, I can not replicate your problem. Check the cell formats and decimal numbers at each point.

Artik
08-25-2019, 01:26 PM
It would be much easier for us to find errors if you attach an Excel file, not an image.
They are probably rounding errors. It is also important how you generated random fractions.

Artik

enggrahul78
08-25-2019, 02:44 PM
Attaching excel will not help because every time i save it and re-open it, the number changes. But I am still attaching it.

I exactly did the below -

Step 1: In Cell B3 i typed =RAND() - This gave me a decimal.
Step 2: In Cell C3 i typed =RAND() - This gave me a decimal.
Step 3: In cell D3 i typed = B3 + C3 -- This gave me a decimal.
Step 4: Now i copied B3,C3,D3 and pasted to few more cells.
Step 5: ** Now i selected everything and changed the Format to Fraction Upto Two digits.

You can try on your sheet and see if the addition of displayed fractions match your traditional calculations......

Paul_Hossler
08-25-2019, 03:24 PM
I did a Copy/Paste Values to 'freeze' the numbers

The fraction format is only approximate. Excel still remembers the full precision value and each cell (including the Sum) is calculated full precision, but displayed as a Fraction

Yellow = Formatted as Fraction
Orange = the Yellow numbers but formatted as General
Green = Displayed fraction as full precision number (numerator / denominator)

24856

24857

p45cal
08-25-2019, 03:47 PM
Where you're seeing 0 is because the number is too small to display Fraction|Up to 2 digits. In the picture below, the table to the right displays the decimal values of the table to the left (they're just linked). You'll see the zero in the left table is actually 0.009077:
24858

If you want to see it more like you did at school you could set the workbook to Set precision as displayed:
24859

Be aware that this permanently loses/changes your data, but you end up with:
24861

Note how the values in the right table have adjusted a bit. The yellow highlighted value in the right table is now zero and you get a 'sensible' fraction in the 3rd column.

Edit post posting: Ahh, Paul beat me to it…

enggrahul78
08-26-2019, 09:16 PM
Thanks a lot for your help and replies.

Paul_Hossler
08-27-2019, 05:51 AM
If you want to get 'normalized' fractions like

1/8 + 1/2 = 5/8

or 1/2 + 70/99 = 239/198

that's harder and won't be exact