Round function (worksheet one) in Excel - excel

Using Excel 2013, typing this into two cells yields different results.
=ROUND((10.45-10.00)/1,1) = 0.4
but
=ROUND(0.45/1,1) = 0.5
And I have no idea why this is the case. Anyone have an explanation?

Because Excel uses floating-point math, so results are not guaranteed to be exact. On my Excel 2013 installation, if I enter =10.45-10.00 in a cell, then change that cell to Number with 30 decimal places of precision, the actual answer is 0.449999999999999000000000000000. Since 0.44999... and 0.45 are on opposite sides of the rounding boundary, they round to one decimal place differently.
Edit See also this answer and the question and other answers, which go into much more detail about why Excel's math is inexact.

It looks like the top calculation is creating an infinitesimally small difference. To see this, pull the formula out of the ROUND function. Using the "Increase Decimal" button, expand both values to 15+ decimal places. You'll see that the top value is actually 0.449999999999999.
I have no idea why it actually does this.

Related

Comparing 2 equal fractions with same decimal value but still getting result as unequal

Problem:
I typed my answer as 17 8/15 (as mixed fraction that is) in the answer box but the answer became 17 ½ though that’s not a problem as the decimal value in both the cells is same and that of 17 8/15.
This (as shown in the pic above) is the value in the formula bar of the Answer box (this is same as that of 17 8/15).
(Note: Further when I copy and paste as values the contents of the above 2 cells, they are as follows:
which means they do have the same values in them.)
But while I type my answer in the answer box, a function works in the Verify Box.
The function is as follows:
=IF($B$1=0,LEFT(AB10,FIND(" ",AB10)-1)+LEFT(AC10,FIND(" ",AC10)-1)+(LEFT(RIGHT(AB10,LEN(AB10)-FIND(" ",AB10)),FIND("/",RIGHT(AB10,LEN(AB10)-FIND(" ",AB10)))-1)*RIGHT(AC10,2)+LEFT(RIGHT(AC10,LEN(AC10)-FIND(" ",AC10)),FIND("/",RIGHT(AC10,LEN(AC10)-FIND(" ",AC10)))-1)*RIGHT(AB10,2))/(RIGHT(AB10,2)*RIGHT(AC10,2)),AE10)
But please don’t mind it until necessary as long story short is as follows:
So, everything was going correctly until the last step where for some reason it rounds off the answer to 2 decimal places. And that is a major problem now as I’m using fractions type value in both the boxes so decimal increase/decrease button is not working.
Now, if it can be helped, I don’t want to change the value setting in the answer box to something other than Fractions (because I wish to answer in fractions only or else I’ll have to calculate further which is neither designed nor intended) but in Verify box its alright to use either of Fractions or Numbers as the value setting.
I have also tried changing the Verify box setting to Number type but the same problem persists and when I click on decimal places increase/decrease for either of the boxes, that still does not work.
Please help. (And thank you reading this question which I know is written too long but I couldn't think of something else to pinpoint my condition/position/problem.)
Edit: My purpose is as follows:
Pls check this image
This image shows the formulas I used in the above image
(Note: Frac2 uses almost same formula as Frac1 and if the formula isn't clearly visible for the Verify cell, due to red bg which is set automatically set by the conditional formatting as the answer wasn't matching, you can check it as it is provided in the main problem already.
The "If-condition" is using a cell which alternates between 0 and 1 to check for true or false condition.)
Here, I am simply trying to create a self-testing math problem that changes every time I solve it and knowing whether my answer is right or wrong.
Frac1 and Frac2 generate random mixed fractions using RANDBETWEEN primarily but since a format is required so CONCAT is used for presentation.
Answer box is the box where I type in my answer in the fraction form.
Verify box verifies if my answer was right or wrong by changing its colour to red if I'm wrong and to green if I'm right. It is written such that it first converts the given mixed fractions into.... mixed fractions but now calculable and then adds them.

Excel changes a 3 decimal number to full number despite formatting options and even in a formula

A colleague of mine sent me their Excel sheet and asked me to take a look at it. The issue is that with a very specific number (56136.598), Excel is automatically extrapolating that number out to 10 decimal places completely regardless of the formatting options.
The cell displays the number to the correct 3 decimal places, but if you look at the number in the formula bar it displays all 10 decimal places. It even changes the number to 10 decimal places if I write the formula =round(56136.598,3) to =round(56136.5979999999,3).
Unfortunately, given the industry I am in, I need some explanation as to why this very specific number induces this change. It's not enough to just use a round or trunc function to lop it off at 3 decimal places, the fact that this number and this cell have a different set up then the rest of the parallel cell calculations is drawing some criticism. Has anyone ran into this before? I have tried it in Excel 2010 and 2019 and in new worksheets, same issue. It seems that excel refuses to accept the number at 3 decimal places and forcing an expansion to 10 decimal places on its own.
This is a normal behavior. See the image below where I just entered 56136,598 into the cell.
This happens due to the fact that Excel is a numeric calculation program and not an algebraic one. So it is a problem of precision. Also see Numeric precision in Microsoft Excel.
Excels results are not absolute but very close to correct. The difference between these to numbers is almost 0 (the difference is 0,0000000001).
And this is actually how most common calculators will act too (you just don't see that). It is just the nature of how calculators (and computers) work.
So there is nothing to worry about.
More about this: Understanding Floating Point Precision, aka “Why does Excel Give Me Seemingly Wrong Answers?”

Understanding ROUND() function in Excel/Libre Calc

I have recently discovered a weired behaviour of MS Excel as well as Libre Office Calc. When I rounded the following number directly to 1 decimal place (last column), it rounded differently than if I went to two decimal places first (2nd column) and then to one decimal place (3rd column).
number ROUND(A1,2) ROUND(A2,1) ROUND(A1,1)
4.449331525248 4.45 4.50 4.40
I'm not a mathematician, but in my sense the rounding directly to one decimal place (last column) is wrong.
Other numbers this happens to include [3.34690622103941, 4.14677866251134, 3.64939941850228, ...].
Can someone explain this phenomenon to me? Thanks!
(Please move this question to an appropriate community, if necessary)
Your results are different because the function looks at different parts of the number to complete either two or one decimal place for its starting point.
For 2dp it looks at 4.449 which is correctly rounded to 4.45, which then correctly rounds to 1dp as 4.5. This is then an incorrect result for 1dp compared to the original source number due to the extra step and the 9.
The moral is if you need 1dp then do it in one step only 4.449 rounds to 4.4. Based on below 5 goes down, above goes up.

Excel roundings not summing properly

I have a excel sheet with a few formulas like this:
A1,A2,A3= 0.13,1.25,2.21
A4: =(A1*A2) =0.16 ( 2 decimal points)
A5: =(A2*A3) =2.76 ( 2 decimal points)
A6: =SUM(A4;A5) =2.93 ( 2 decimal points )
And i want to show 0.16+2.76=2.92
well, there's my problem in bold. i want to add the values from the cells, not the formuls result. How can i do that ? Thank you
Presumably you're working with money which is why you need this.
One way to resolve this is to use =ROUND(A1*A2, 2) etc. and base your subsequent calculations from that.
Do be aware though that you will still occasionally get spurious results due to Excel using a 64 bit IEEE754 floating point double to represent numbers. (Although it does have some extremely clever circumvention techniques - see how it evaluates 1/3 + 1/3 + 1/3 - it will not resolve every possible oddity). If you're building an accounting-style sheet you are best off working in pence, and dividing the final result.
Round the values before you sum, ie:
=ROUND(A1*A2,2)
=ROUND(A2*A3,2)
You could wrap your formulas with the ROUND function:
=ROUND(A1*A2,2)
This will give you 0.16 as opposed to 0.163. Do this for each of your calculations and you'll only be calculating everything to two decimal places. Although I'm not sure why you'd want to do that.

Excel keeps rounding numbers into full numbers (e.g. shows 5.00) instead of displaying decimals

I have been trying to fix this for over an hour now, trying every possible answer I have read on every forum and site when Googling.
I have a series of numbers that I want to multiply by 0.15 (15 cents). However, instead of showing the actual result (33 * 0.15 = 4.95) it shows a ful number.
A full number with decimals (that is, 5.00) but a full number. As you see, it is not an issue of increasing or decreasing decimals, format, etc.
Here is a screenshot
Thanks!
ON the "Home table" click on the "decrease" or "increase" decimal (to the right of what appears on your tab-bar as "Numero"
If that doesnt work, if you look at the actual contact of the cell is there a formula in it (rather than numbers? i.e. something like:
=ROUNDDOWN(A1,-2)
=ROUNDUP(A1,-2)
=ROUND(A1,-2)
They also force rounding of numbers.
And finally the only other option I can think of is looking at the "cell format", but from what it appears you already have it on "Money"...
Just incase, double check that it's not a form of finance that "rounds off" figures. As That happens too!

Resources