Dec 14 2021 02:27 AM
There is a small problem with a following very simple expression:
=-(A2+1)^2
It gives a false positive results, different form this:
=-1*(A2+1)^2
Which working correctly.
I am using the Office Professional Plus 2016 version of the excel.
Dec 14 2021 11:31 AM
The difference between negation and subtraction relating to Excel is discussing for at least 25 years. Logical negation has function as NOT(). For arithmetic negation it is used "minus" sign in front of expression. Virtually you may consider it something like =NAR(expression) which has high priority instead of =-expression.
For the sample
=-(A2+1)^2 => NAR(A2+1) ^ 2 == (-(A2+1))^2
That's not Excel specific, same is in Google Sheets and any programming language which use minus as arithmetic negation.
Dec 17 2021 02:01 AM
Dec 18 2021 07:14 AM
If consider Excel as calculator with lot of unnecessary features - yes, it shall be school math. If consider Excel as data modelling tool, which is it, it has to have negation and negation works as it works everywhere.
That's not Excel specific, any spreadsheet tool. If you enter
=-5^2
each of Excel, Google Sheets or Zoho Sheet (I believe any other one) return +25. The only difference, some tools as Zoho Sheet automatically converts above formula to
=(-5)^2
which you may see in formula bar.
Again, the key is do we have negation operator or not. School math doesn't introduce it, calculators don't have it. Spreadsheets and programming languages have. As soon as you have such operator you shall accept order of operations with it and don't miss negation with subtraction, even if they have the same minus symbol to indicate the operator.