ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Calculated Values (https://www.excelbanter.com/excel-worksheet-functions/151493-calculated-values.html)

ssoerens

Calculated Values
 
A particular spreadsheet of mine automatically turns numerical math formulas
into the calculated value. (e.g. =A13/8/100 becomes =A13/.008 which, by the
way, isn't even correct for precedence of operations). If I type
=A13/(8)/(100) the formula is preserved, and the calculation is correct. I
don't have this problem on other spreadsheets; how do I fix this?

Mike H

Calculated Values
 
Both of the examples you give are the equivalent to dividing by 800 and
precedence isn't an issue because 1/8/100 gives the same result as 1/100/8
=0.00125

Assuming a 1 in A13, if you really get 125.0 (a13/.008) for a13/8/100 then
that is indeed surprising.

What number do you have in A13 and what do you expect the answer to be?

Mike

"ssoerens" wrote:

A particular spreadsheet of mine automatically turns numerical math formulas
into the calculated value. (e.g. =A13/8/100 becomes =A13/.008 which, by the
way, isn't even correct for precedence of operations). If I type
=A13/(8)/(100) the formula is preserved, and the calculation is correct. I
don't have this problem on other spreadsheets; how do I fix this?


ssoerens

Calculated Values
 
Dear Mike,

There are actually two issues here, and precedence is one of them. When the
operators are of equal precedence, they are supposed to execute from left to
right, exactly as you showed in your example. In my problem A13/8/1000
really did evaluate itself to A13/.008. (Sorry about leaving off the last
'0' in my initial post.) Instead of the expected value of (A13/8)/1000, my
result was equivalent to A13/(8/1000). That is the wrong precedence.

The other issue is that a (numeric) formula calculates itself within the
cell and diplays the resulting value - instead of the formula - in the
formula bar. The value in my cell A13 is not important. Explicitly, the
value was 173,069. I was taking a dollar amount, to spread over 8 months,
and report it in thousands (of dollars). I have done this type of thing
innumerable times before without trouble; this time I am getting the
"surprising" result. What I saw in the formula bar as the cell contents was
"=A13/0.008". The formula had evaluated itself.

This has happened to me a time or two in the past, that the operator entered
between two numeric values calculates itself within the cell and displays
only the resultant decimal value in the formula bar. I appreciate you taking
the time to have read my post. I hope that there is a solution. Thanks.



"Mike H" wrote:

Both of the examples you give are the equivalent to dividing by 800 and
precedence isn't an issue because 1/8/100 gives the same result as 1/100/8
=0.00125

Assuming a 1 in A13, if you really get 125.0 (a13/.008) for a13/8/100 then
that is indeed surprising.

What number do you have in A13 and what do you expect the answer to be?

Mike

"ssoerens" wrote:

A particular spreadsheet of mine automatically turns numerical math formulas
into the calculated value. (e.g. =A13/8/100 becomes =A13/.008 which, by the
way, isn't even correct for precedence of operations). If I type
=A13/(8)/(100) the formula is preserved, and the calculation is correct. I
don't have this problem on other spreadsheets; how do I fix this?



All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com