# How to use the Excel CHAR function | Exceljet # **How to use the Excel CHAR function | Exceljet** **Source de la capture:** [How to use the Excel CHAR function | Exceljet](https://exceljet.net/excel-functions/excel-char-function) CAR en francais. CAR(10) salto de linea CAR(32) espacio * * * # **Excel CHAR Function** ![[27044c48a08e860e37f257225910ca8c.png]] Summary  The Excel CHAR function returns a character when given a valid character code. CHAR can be used to specify characters that are hard to enter in a formula. For example, CHAR(10) returns a line break, and can be used to add a line break to text in a formula. . . . Purpose  Get a character from a number Return value  A single character specified by a number. Syntax  \=CHAR (number) Arguments  * **number** - A number between 1 and 255. Version  [Excel 2003](https://exceljet.net/version/excel-2003) Usage notes  The CHAR function returns a character when given a valid character code. Use the CHAR to translate ASCII code page numbers into actual characters. For example: ``` =CHAR(65) // returns "A" =CHAR(97) // returns "a" ``` the CHAR function takes just one [argument](https://exceljet.net/glossary/function-argument), _number_, which must be an integer between 0-255. The result from CHAR is a [text value](https://exceljet.net/glossary/text-value). The CHAR function was designed to operate in an ASCII/ANSI world, and only understands numbers 0-255. For extended character support on modern Unicode systems, see the [UNICHAR function](https://exceljet.net/excel-functions/excel-unichar-function). CHAR can be useful when you want to specify characters in formulas or functions that are awkward or impossible to type directly. For example, you can use CHAR(10) to add a line break in a formula like this: ``` ="line 1"&CHAR(10)&"Line 2" // add line break ``` _Notes: [Text wrap](https://exceljet.net/lessons/how-to-wrap-text-in-cells-in-excel) must be enabled to see the line break take effect. Older versions of Excel on the Mac use character 13 for a line break._ ### **Reverse CHAR** To get the numeric code for a character, you can use the [CODE function](https://exceljet.net/excel-functions/excel-code-function): ``` =CODE("A") // returns 65 ``` CODE performs the reverse of CHAR, taking a character as text and returning a number. ### **ASCII and ANSI** The numbers returned by the CHAR function come from ASCII. ASCII stands for "American Standard Code for Information Interchange" and is a 7-bit character set that contains characters from 0 to 127. The original [ASCII specification](https://en.wikipedia.org/wiki/ASCII) encodes 128 characters into numbers. These  include the numbers 0 to 9, lowercase a-z, uppercase A-Z, and punctuation. The first 32 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). ANSI (American National Standards Institute) is a generic term for 8-bit character sets, the default in Windows 95 and Windows NT. ANSI includes the same ASCII codes 0-127, and adds an additional 128 characters (128-255) to handle special characters which can change based on the language being represented. ### **Notes** * If _number_ is out of range, CHAR returns #VALUE! * If _number_ is not numeric, CHAR returns #VALUE! . . * * * # **ASCII - Wikipedia** ### **Control code chart** | | | | | | | --- | --- | --- | --- | --- | | [Dec](https://en.wikipedia.org/wiki/Decimal) | [Hex](https://en.wikipedia.org/wiki/Hexadecimal) | [b](https://en.wikipedia.org/wiki/ASCII#cite_note-47) | [c](https://en.wikipedia.org/wiki/ASCII#cite_note-48) | Name (1967) | | 0 | 00 | ␀ | ^@ | [Null](https://en.wikipedia.org/wiki/Null_character) | | 1 | 01 | ␁ | ^A | [Start of Heading](https://en.wikipedia.org/wiki/Start_of_Heading) | | 2 | 02 | ␂ | ^B | [Start of Text](https://en.wikipedia.org/wiki/Start_of_Text) | | 3 | 03 | ␃ | ^C | [End of Text](https://en.wikipedia.org/wiki/End-of-Text_character) | | 4 | 04 | ␄ | ^D | [End of Transmission](https://en.wikipedia.org/wiki/End-of-Transmission_character) | | 5 | 05 | ␅ | ^E | [Enquiry](https://en.wikipedia.org/wiki/Enquiry_character) | | 6 | 06 | ␆ | ^F | [Acknowledgement](https://en.wikipedia.org/wiki/Acknowledge_character) | | 7 | 07 | ␇ | ^G | [Bell](https://en.wikipedia.org/wiki/Bell_character) | | 8 | 08 | ␈ | ^H | [Backspace](https://en.wikipedia.org/wiki/Backspace)[e](https://en.wikipedia.org/wiki/ASCII#cite_note-50)[f](https://en.wikipedia.org/wiki/ASCII#cite_note-bsp_del_mismatch-51) | | 9 | 09 | ␉ | ^I | [Horizontal Tab](https://en.wikipedia.org/wiki/Horizontal_Tab)[g](https://en.wikipedia.org/wiki/ASCII#cite_note-52) | | **==10==** | 0A | ␊ | ^J | [Line Feed](https://en.wikipedia.org/wiki/Line_Feed) | | 11 | 0B | ␋ | ^K | [Vertical Tab](https://en.wikipedia.org/wiki/Vertical_Tab) | | 12 | 0C | ␌ | ^L | [Form Feed](https://en.wikipedia.org/wiki/Form_Feed) | | 13 | 0D | ␍ | ^M | [Carriage Return](https://en.wikipedia.org/wiki/Carriage_Return)[h](https://en.wikipedia.org/wiki/ASCII#cite_note-53) | | 14 | 0E | ␎ | ^N | [Shift Out](https://en.wikipedia.org/wiki/Shift_Out) | | 15 | 0F | ␏ | ^O | [Shift In](https://en.wikipedia.org/wiki/Shift_In) | | 16 | **==10==** | ␐ | ^P | [Data Link Escape](https://en.wikipedia.org/wiki/Data_Link_Escape) | | 17 | 11 | ␑ | ^Q | [Device Control 1](https://en.wikipedia.org/wiki/Device_Control_1) (often [XON](https://en.wikipedia.org/wiki/XON)) | | 18 | 12 | ␒ | ^R | [Device Control 2](https://en.wikipedia.org/wiki/Device_Control_2) | | 19 | 13 | ␓ | ^S | [Device Control 3](https://en.wikipedia.org/wiki/Device_Control_3) (often [XOFF](https://en.wikipedia.org/wiki/XOFF)) | | 20 | 14 | ␔ | ^T | [Device Control 4](https://en.wikipedia.org/wiki/Device_Control_4) | | 21 | 15 | ␕ | ^U | [Negative Acknowledgement](https://en.wikipedia.org/wiki/Negative-acknowledge_character) | | 22 | 16 | ␖ | ^V | [Synchronous Idle](https://en.wikipedia.org/wiki/Synchronous_Idle) | | 23 | 17 | ␗ | ^W | [End of Transmission Block](https://en.wikipedia.org/wiki/End-of-Transmission-Block_character) | | 24 | 18 | ␘ | ^X | [Cancel](https://en.wikipedia.org/wiki/Cancel_character) | | 25 | 19 | ␙ | ^Y | [End of Medium](https://en.wikipedia.org/wiki/End_of_Medium) | | 26 | 1A | ␚ | ^Z | [Substitute](https://en.wikipedia.org/wiki/Substitute_character) | | 27 | 1B | ␛ | ^\[ | [Escape](https://en.wikipedia.org/wiki/Escape_character)[j](https://en.wikipedia.org/wiki/ASCII#cite_note-55) | | 28 | 1C | ␜ | ^ | [File Separator](https://en.wikipedia.org/wiki/File_Separator) | | 29 | 1D | ␝ | ^\] | [Group Separator](https://en.wikipedia.org/wiki/Group_Separator) | | 30 | 1E | ␞ | ^^[k](https://en.wikipedia.org/wiki/ASCII#cite_note-56) | [Record Separator](https://en.wikipedia.org/wiki/Record_Separator) | | 31 | 1F | ␟ | ^\_ | [Unit Separator](https://en.wikipedia.org/wiki/Unit_Separator) | | 127 | 7F | ␡ | ^? | [Delete](https://en.wikipedia.org/wiki/Delete_character)[l](https://en.wikipedia.org/wiki/ASCII#cite_note-57)[f](https://en.wikipedia.org/wiki/ASCII#cite_note-bsp_del_mismatch-51) | Other representations might be used by specialist equipment, for example [ISO 2047](https://en.wikipedia.org/wiki/ISO_2047) graphics or [hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) numbers. ### **Printable characters** Codes 20[hex](https://en.wikipedia.org/wiki/Hexadecimal) to 7E[hex](https://en.wikipedia.org/wiki/Hexadecimal), known as the printable characters, represent letters, digits, [punctuation marks](https://en.wikipedia.org/wiki/Punctuation_mark), and a few miscellaneous symbols. There are 95 printable characters in total.[m](https://en.wikipedia.org/wiki/ASCII#cite_note-58) Code 20[hex](https://en.wikipedia.org/wiki/Hexadecimal), the ["space" character](https://en.wikipedia.org/wiki/Space_(punctuation)), denotes the space between words, as produced by the space bar of a keyboard. Since the space character is considered an invisible graphic (rather than a control character)[3](https://en.wikipedia.org/wiki/ASCII#cite_note-Mackenzie_1980-3): 223 [46](https://en.wikipedia.org/wiki/ASCII#cite_note-RFC-20_1968-59) it is listed in the table below instead of in the previous section. Code 7F[hex](https://en.wikipedia.org/wiki/Hexadecimal) corresponds to the non-printable "delete" (DEL) control character and is therefore omitted from this chart; it is covered in the previous section's chart.  Earlier versions of ASCII used the up arrow instead of the [caret](https://en.wikipedia.org/wiki/Caret) (5E[hex](https://en.wikipedia.org/wiki/Hexadecimal)) and the left arrow instead of the [underscore](https://en.wikipedia.org/wiki/Underscore) (5F[hex](https://en.wikipedia.org/wiki/Hexadecimal)).[5](https://en.wikipedia.org/wiki/ASCII#cite_note-ASCII-1963-5)[47](https://en.wikipedia.org/wiki/ASCII#cite_note-Haynes_2015-60)