Forum Discussion
How to disable Excel function triggered by a leading hyphen
- Mar 07, 2022Thank you Peter and Riny,
I now appreciate that when a new sheet is created it has the NUMBER attribute GENERAL which caters for formulae and number entries.
From now on when I create a new sheet intended chiefly for text entry, I will select the whole sheet - click on top left bottom of the displayed sheet, then from the home ribbon in the Number group select TEXT. If subsequently within this sheet I have cells, column or row dealing with numbers, dates etc. then I with use the NUMBER group appropriately for these.
This fully satisfies my original question of how to disable the interpretation of the hyphen as a formula. The general Microsoft help line was unable to directly resolve the issue for me, however I give full marks to the Excel Technical Forum to which it referred me.
Most of my work done when I am using Excel involves text. So I’m thrown off guard when a leading hyphen is interpreted as a formula generator.
The reverse change button also fails to get out of this situation, ESC can help.
Sometimes the response is for Excel to generate #NAME in the cell with a folded top left corner.
Other times the cell identification such as B13 is replaced in the cell or next cell clicked into.
I have managed to get a message in the process :
______________
Microsoft Excel
There’s a problem with this formula.
Not trying to type a formula?
When the first character is an equal (“-”) or minus sign, Excel thinks it’s a formula.
To get around this, type an apostrophe (‘) first.
Apparently Microsoft is aware of the problem it has imposed on its users of text and is not ready to budge from insisting that they get around it by using an apostrophe.
Has consideration been given to being able to classify sheets or cells as non-formula?
This problem has been around for decades however I still get caught out by it every now and then, and it breaks my concentration and angers me.
"Apparently Microsoft is aware of the problem it has imposed on its users of text and is not ready to budge from insisting that they get around it by using an apostrophe.
Has consideration been given to being able to classify sheets or cells as non-formula?"
Probably not. What is a problem to you is a 'feature' that is used day in day out by other Excel users, and Microsoft is unlikely to break backward compatibility to address this issue. Riny_van_Eekelen 's suggestion of formatting cells as text is the solution, the catch being when someone tries to add a formula (starting with "=") to your workbook it will just sit there looking at them as dumb text.
Excel is a calculation tool and, as such, is desperate to convert anything that could be a number or formula into one (excuse my personification of Excel).
- motejodAug 02, 2023Copper Contributor
PeterBartholomew1 Yeah sorry I'm a daily Excel user/Accountant/numbers/formulas guy and have never seen any benefit to this "feature" whatsoever... but maybe I'm completely missing something.
- Horatio_DMar 07, 2022Copper ContributorThank you Peter and Riny,
I now appreciate that when a new sheet is created it has the NUMBER attribute GENERAL which caters for formulae and number entries.
From now on when I create a new sheet intended chiefly for text entry, I will select the whole sheet - click on top left bottom of the displayed sheet, then from the home ribbon in the Number group select TEXT. If subsequently within this sheet I have cells, column or row dealing with numbers, dates etc. then I with use the NUMBER group appropriately for these.
This fully satisfies my original question of how to disable the interpretation of the hyphen as a formula. The general Microsoft help line was unable to directly resolve the issue for me, however I give full marks to the Excel Technical Forum to which it referred me.