Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Defining Shortcut Keys for Symbols.
Written by Allen Wyatt (last updated September 18, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
John uses Excel to keep a maintenance log. He frequently needs to add a symbol from the Insert Symbol dialog box. He'd like to assign the symbol to a shortcut key (it doesn't have one already), but cannot find a way to do it.
Some symbols have obvious shortcut keys, defined by the folks in Redmond. One of the lesser-known facts is that every symbol has a "shortcut" key, but using that shortcut may not seem that short. How does this work? By holding down the Alt key as you type the ASCII or ANSI code for the symbol.
For instance, let's say you want to enter the cents symbol. If you display the Symbol dialog box and select the cents symbol, at the bottom right of the dialog box you can see the character code for the symbol (it is 00A2). This is a hexadecimal number; you need to convert it to regular decimal notation. You can do this by using the formula =HEX2DEC("00A2"), which returns the value 162. If you remember this code, you can hold down the Alt key as you type the code, with a leading zero, on the numeric keypad.
This approach works great if you only need to input a few symbols on a regular basis; it doesn't take much work to remember those few codes you need. However, if you have a lot of symbols you need to work with, then remembering codes becomes more problematic. You could develop your own printed "cheat sheet" for the symbols so that you can refer to it all the time, or you could rely on Excel's AutoCorrect feature to do the remembering for you. Follow these steps:
Figure 1. The AutoCorrect tab of the AutoCorrect dialog box.
Now you can just type the mnemonic when you want the symbol to appear. When you type the space bar after the mnemonic, AutoCorrect kicks in and replaces it with the symbol.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9332) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Defining Shortcut Keys for Symbols.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
Need to get rid of everything in a worksheet except the formulas? It's easier to make this huge change than you think it is.
Discover MoreWhen you are entering information in a worksheet, it sure would be handy to have a way to "mask" the information being ...
Discover MoreEdit a cell in the Formula bar, and Excel highlights the cells referenced in that formula. If you want to see cells ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-09-19 23:28:07
Tomek
To expand on my last comment: you can use the function =UNICHAR(decimal code) or =UNICHAR(HEX2DEC(hexadecimal code)) to generate an unicode character. Then you can copy the cell and paste it (values only) elsewhere. From there you can copy just that character to be used in autocorrect, find and replace, etc.
2021-09-19 23:18:06
Tomek
@Elliot W Penna: What you suggest is true only for a subset of the characters - the ones that exist in ASCII. If you want any Unicode characters that are not ASCII, their code will only be available in hexadecimal. On the other hand Unicode characters like this cannot be entered by Alt+NNNN trick. In Word there is HHHH, Alt-X trick, where HHHH is the Unicode hexadecimal, but Excel is just a brother from another father ;-)
2021-09-19 18:42:54
Tomek
A problem with the approach shown in this tip is that it will only autocorrect full words, so it will not convert myhrt into my♥. It will, however, convert "my hrt" into "my ♥ ". Note a space after the heart. it is there because I pressed space after the mnemonic. If I used any punctuation or a character that is considered a delimiter by Excel, that character would follow the heart. In Excel, you cannot save a string ending with spaces in the Replace box, hence the only time nothing will follow the heart of this example is if you press enter.
A solution proposed by Kiwerry, in addition to making it more resistant to unwanted symbol insertions, also will autocorrect the mnemonic preceded by letters or other characters (or partial words). The underscore acts as a delimiter indicating the beginning of a string to be autocorrected. Other characters like !, &, - , /, etc. can also be used to act as this delimiter. One that does not work well is @, as at the beginning of the cell entry it indicates a legacy function.
2021-09-18 11:03:38
Kiwerry
To reduce the likelihood that a mnemonic you choose may occur within a word or as an abbreviation or acronym, which would result in unwanted symbol insertions, it may be worthwhile prefixing all the mnemonics you use for symbols with a character that is unlikely to occur elsewhere. Using Allen's example it may be better to use "_hrt" instead of just "hrt"
2021-09-18 08:16:24
Elliot W Penna
In my version of Excel, the character code in the lower right corner is displayed in hex, as Allen indicates, but to change to decimal you only need to use the dropdown in the "from" window to change... FROM: ASCII (hex) TO: ASCII (decimal).
That is, there is no need to use the HEX2DEC function to find the decimal equivalent.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments