The original ASCII specification encodes 128 characters into numbers (see table below). These include the numbers 0 to 9, lowercase a-z, uppercase A-Z, and punctuation. The first 31 characters are non-printing “control codes”, most of which are no longer used, with the exception of the carriage return (13), line feed (10), and tab (9).

ASCII codes in Excel

Excel contains two functions designed to work with ASCII codes: the CHAR function and the CODE function. To specify a character according to its ASCII number, you can use the CHAR function like this: To return the ASCII number for a character, you can use the CODE function: Note: The Unicode character set is widely used these days on the web and in modern applications. Unlike ASCII, Unicode is a standard designed to support all of the world’s languages, and has many thousands of characters. Excel has two functions designed to work with this extended character set: UNICHAR and UNICODE.

ASCII codes

The table below shows standard printable ASCII characters and codes. The second table shows non-printable control codes.

ASCII control codes

The table below shows the first 31 characters in ASCII, which are non-printing control codes. These codes were originally intended to control devices, and are no longer used, with the exception of the carriage return (13), line feed (10), and tab (9). Author

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.