Numbers newbie: Sum formula giving me wrong answer

Numbers newbie here.

I have created a sum of two cells using a formula.


But when I try to use the formula, it is obviously one digit off.




The answer should obviously be 21.56%. What am I doing wrong?




Thanks.

MacBook Pro 13″, macOS 10.14

Posted on Sep 18, 2020 3:17 PM

Reply
Question marked as Top-ranking reply

Posted on Sep 18, 2020 6:20 PM

** writes: "Round to 4 places.

As an example, 30.123% is the decimal number 0.30123

If you round to 2 decimals you get 0.30 which is then displayed as 30.00%"


Thanks for that reminder, Badunit! I had missed the detail that 'percentages' are expressions of a value as the numerator of a fraction whose denominator is 100, making 25% an expression of the same value as 25/100, or 0.25. As Numbers' rounding rules consider the decimal form to be the 'actual' value, getting two decimal places in the percentage format requires rounding the decimal value to 4 places after the decimal.


Regards,

Barry

8 replies
Question marked as Top-ranking reply

Sep 18, 2020 6:20 PM in response to Badunit

** writes: "Round to 4 places.

As an example, 30.123% is the decimal number 0.30123

If you round to 2 decimals you get 0.30 which is then displayed as 30.00%"


Thanks for that reminder, Badunit! I had missed the detail that 'percentages' are expressions of a value as the numerator of a fraction whose denominator is 100, making 25% an expression of the same value as 25/100, or 0.25. As Numbers' rounding rules consider the decimal form to be the 'actual' value, getting two decimal places in the percentage format requires rounding the decimal value to 4 places after the decimal.


Regards,

Barry

Sep 18, 2020 3:50 PM in response to boysx3

"What am I doing wrong?"


Nothing.


How do the values in columns K and L get there?


If they are produced by a formula, the likely cause of the 'wrong' (but actually correct) result in M12 is that the displayed value in each of the three cells has been rounded to the nearest hundredth of a percent, but the actual value in each of the cells has been calculated to a much greater precision.


Here's an example, using entered values that will produce the result shown in your screen shot:

And here is the same example, with the display set to show the rest of the values in the decimal fraction part of each value:


You can check this by choosing all three cells, then clicking thr format brush to open the format inspector.

In the inspector panel, choose Cell, then note the decimal setting, which is probably "2", meaning two places after the decimal.


Your values will not likely match my example, but the result in M12 will be similar.


To make the table display match your expectations, ROUND each of the values (not just the display) to two places after the decimal.


ROUND(formula,2)


Where formula is replaced with the formula creating the value in each cell.


Regards,

Barry

Sep 18, 2020 5:27 PM in response to boysx3

Can you show us a larger portion of the table, and include the row and column reference tabs (as seen in my example_?


Does one of the cells in your screen shot contain the formula seen in the second image?

Are cells F12 and D12 shown in the screen shots?


Assuming the selected cell in the upper image contains a formula that sums the amounts in the blue highlighted cells, the answer is correct.


Here is an example containing entered values in D12 and F12 and the formula shown from your post above in cell I12 (formula displayed below the table).


Cell I13 contains the same formula stripped of the ROUND function; F12/D12


Regards,

Barry

Sep 18, 2020 5:56 PM in response to Barry

Round to 4 places.

As an example, 30.123% is the decimal number 0.30123

If you round to 2 decimals you get 0.30 which is then displayed as 30.00%


Rounding the results will make the number you see on the screen be the actual number in the cell, no extra unseen digits. But it is possible with rounding that more of the cells rounded down than up, which will make the total incorrect. When you round to 4 places you may get the result you are looking for but, then again, you might not. You might get 99.99% instead of 100%.


21.55% was the correct sum in your first post (though it did not look like correct). After rounding the two cells to be added, the result became 21.56 which looks correct but is an incorrect result.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Numbers newbie: Sum formula giving me wrong answer

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.