Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Convince Excel to Treat a - as a Minus Sign in calculations and not a Negative

Posted on 2014-08-15
Medium Priority
Last Modified: 2014-08-25
I understand why Excel is doing this as per this document, but I want to change the calculation order to not be a negative as I want it treated as an operator i.e. a minus.


2/4-3+9*6 = 51.5 according to Excel and Google treated as (2/4)-3+9*6 I think.

I however want it to calculate like this:

Division First = 2-3+9*6
Multiplication Second = 2-3+54
Addition Third = 2-57
Subtraction Last = -55

Any way I can change this behaviour with a custom function or indeed something else?
Question by:Alex Haines
  • 3
  • 2
LVL 27

Expert Comment

by:Shaun Kline
ID: 40263021
First, 2 divided by four is not 2. It is 0.5. Do you have this formula written correctly?

If you want the operations to occur in that fashion, utilize parentheses.

LVL 27

Expert Comment

by:Shaun Kline
ID: 40263039
Also, as a point of clarification, the link your provided is not specific to Excel. In math, the order of operations is always handled using the PEDMAS rule: Parenthesis, Exponents, Division/Multiplication, Addition/Subtraction.

Author Comment

by:Alex Haines
ID: 40263050
Sorry my mistake:

Division First = 0.5-3+9*6
Multiplication Second = 0.5-3+54
Addition Third = 0.5-57
Subtraction Last = -56.5

Yes I could be using brackets but I was hoping not to have to. Perhaps it is easier to show you the spreadsheet. Macros are in there for the custom formula.problem.xlsm

Author Comment

by:Alex Haines
ID: 40263054
Sorry Shaun, I replied to your first comment and then saw the second. Yes I know it is following BODMAS (as we called it in my school days) but it is the minus sign that is being handled against my wishes and interpreted as a negative number i.e. negative 3 (0-3) not x-3=y.
LVL 27

Accepted Solution

Shaun Kline earned 1500 total points
ID: 40263097
It may not be doing what you want, but it is doing what it is supposed to, as written. Another way of writing that formula, per math rules, would be:

((2/4) - 3) + (9 * 6)

If you want both the 3 and 9 * 6 subtracted from the first part, you would either need to use brackets or distribute the minus sign:

2/4 - (3 + (9 * 6))   or (2/4) - 3 - (9 * 6)

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question