Forum Discussion
SergioSolimena
Apr 04, 2019Copper Contributor
A case of wrong formula calculation in Excel?
I like to have your opinion on the formula calculation performed by Excel in a particolar case that surprised me very much. This is the case. A(1,1) =5 A(2,1) = - A1^2 Excel display result in A(2...
Detlef_Lewin
Apr 04, 2019Silver Contributor
Check the order of operation with formula evaluation.
-A1^2 -> -5 -> -5^2 -> 25
-(A1^2) -> -(5^2) -> -(25) -> -25
PeterBartholomew1
Apr 04, 2019Silver Contributor
The help page shows the operator precedence to be as shown in the following table.
If in doubt, a pair of parentheses work wonders!
Operator | Description |
: (colon) (single space) , (comma) | Reference operators |
– | Negation (as in –1) |
% | Percent |
^ | Exponentiation |
* and / | Multiplication and division |
+ and – | Addition and subtraction |
& | Connects two strings of text (concatenation) |
= | Comparison |