Share via

Excel 2007 - How do I stop the automatically replaced hyphen?

Anonymous
2012-03-19T15:11:33+00:00

When I type in a normal hyphen, Excel replaces it with a long hyphen that is not the same character. 

In Word, this can be changed in the AutoCorrect settings in the "Auto Format as you Type" box, however in Excel, this box only contains 3 items, none of which is the hyphen.

Any idea where this setting would be located?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2012-03-19T23:37:30+00:00

Ascii 45 is a regular hyphen.....150 is an en dash.......151 is an em dash.

Reading your original description it sounded like your problem was constant but you say it is random.

Since it is random it would not seem be an autocorrect feature.

Does this occur only in one workbook/worksheet or is it a global occurrence?

If one workbook Is the workbook a macro-enabled workbook.......*.xlsm

If just one sheet and random cells perhaps some event code behind the sheet?

I have no idea where it would be coming from otherwise.

When data is replaced by overwriting you don't usually have leftovers.

Gord

Was this answer helpful?

0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-03-19T21:43:50+00:00

    It returns "45" when I type a hyphen into a blank cell.  However, if I go to a cell with the long dash and copy just the dash, it reads "150".

    I currently have Calibri selected as the default font.

    I am still not sure where the long dash is coming from, but it seems to be random.

    Is it possible that it is left over from other data that was replaced?

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-03-19T20:07:29+00:00

    I am surprised to hear that.

    All your Office 2007 applications use the same *.ACL file so if you have eliminated that in Word it should carry over to Excel.

    What font type are you using?

    Is the hyphen replaced with the em dash in all fonts?

    Do you have some code running that might be doing the deed?

    Type a hyphen in a cell formatted to Arial font.

    In an adjacent cell enter  =CODE(cellref)

    Does it return 151 which is the em dash?

    Gord

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-03-19T19:44:08+00:00

    I can not find the hyphen listed, There is no specific check box for it, and it is not listed in the "Replace text as you type" box.

    Any other ideas?

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2012-03-19T16:22:40+00:00

    Look under Autocorrect Options>Autocorrect Tab.............not Autoformat as you type Tab

    Gord

    Was this answer helpful?

    0 comments No comments