How to prevent Excel from inserting formulas when typing + or - at the beginning of a cell?

58,893

Solution 1

I'd suggest typing an apostrophe ' before typing the plus or minus. This will escape that functionality and disappear once you move on.

Solution 2

An easier way to disable the automatic formula function is to reformat the sheet (or individual rows, columns, or cells, as suits your need) as Text.

Share:
58,893

Related videos on Youtube

phuclv
Author by

phuclv

Normal user, not super

Updated on September 18, 2022

Comments

  • phuclv
    phuclv almost 2 years

    Sometimes I have to mark some cells in a spreadsheet with - to indicate that it was not available or not related, not tested... Sometimes I also use + to denote positiveness or availability.

    But after pressing +/- key in an empty cell and press arrow keys or click mouse button to proceed to the next cell like I usually do, it automatically selects the other cell in the formula. So I have to quit editing and type the text again. This is very annoying.

    I never start a formula with + or - but always use =. So how can I turn off this behavior? Using macro is also fine.

  • phuclv
    phuclv over 9 years
    I already know that for years, but this is not a solution, since it requires 2 keystrokes while + and - can already be at the beginning of the cell without escaping
  • Raystafarian
    Raystafarian over 9 years
    @LưuVĩnhPhúc you didn't specify what version of excel, but you could try pre-formatting the cells to "text" - though it doesn't work for me
  • phuclv
    phuclv over 9 years
    I've tried that on both excel 2007 and 2010 and it doesn't work
  • phuclv
    phuclv about 9 years
    @fixer1234 a macro is a permanent solution
  • hBy2Py
    hBy2Py about 9 years
    I know of no setting to disable this behavior with - and +, and no way to intercept keystrokes at the time of formula entry in the way you're seeking. Event macros such as Worksheet_Change only fire when you finish editing a formula, but the problem is that Excel enters formula entry mode instead of value entry mode on the 'application level' when it sees =, + or - as the first character entered. I believe there is no VBA 'hook' for macros to grab hold of to alter the behavior.
  • Máté Juhász
    Máté Juhász about 9 years
    What do you mean by defined in the format? You don't type them but the macro runs immediately when you changed your cell content and you will have them.
  • phuclv
    phuclv about 9 years
    ok I misread your solution