Features of !SEMTools
↑ Навигация по задачам в Excel и возможностям надстройки !SEMTools ↑

CHAR

CHAR function in Excel - examples
CHAR function - simplest examples
Function categoryText
VolatilityNon-volatile
Similar functionsCODE, UNICODE, UNICHAR

What does the CHAR function do?

This function converts an integer to the character that corresponds to it in the current ANSI encoding used by the operating system.

IMPORTANT: ANSI encoding is a collective concept - there are many of them (encodings), and the mapping table of numbers and characters will vary depending on what is specified in your operating system's registry.

CHAR function syntax

=CHAR(number)
CHAR: code → character
B2=CHAR(A2)
ABC
1CodeCHARWhat it is
265A=CHAR(A2)Latin A
397a=CHAR(A3)Latin a
434"=CHAR(A4)double quote
510↵=CHAR(A5)line break (visible with Wrap Text)
6169©=CHAR(A6)copyright
7256#VALUE!=CHAR(A7)outside 1–255

Codes 128–255 depend on the system code page; here it is Windows-1252, the default for English Windows. For characters outside 1–255 use UNICHAR: =UNICHAR(8364) gives €.

The number must be from 1 to 255, otherwise the function will return a #VALUE! error.

Character codes and their corresponding symbols

The table below will help you quickly navigate when you need rarely used symbols. The most in-demand ones are:

  • line break character - 10
  • ™ symbol - 153
  • ® symbol - 174
  • © symbol - 169
  • guillemets - 171 and 187
  • plus-minus sign (±) - 177
The most-used codes
B2=CHAR(A2)
ABC
1CodeCharacterTypical use
2153™=CHAR(A2)trademark
3174®=CHAR(A3)registered
4169©=CHAR(A4)copyright
5171«=CHAR(A5)opening guillemet
6187»=CHAR(A6)closing guillemet
7177±=CHAR(A7)plus-minus
810Line 1↵Line 2="Line 1"&CHAR(10)&"Line 2"line break inside a cell

A line break from CHAR(10) shows only when Wrap Text is on (↵ marks it here).

Complete table of character codes in US encoding
Complete table of character codes

CHAR function examples

In addition to its intended use, the CHAR function can be used for other tasks in Excel, including those where it serves as an auxiliary function.

Create alphabet with CHAR function in Excel

A convenient way to avoid typing letters manually from the keyboard.

Depending on which alphabet you want to create in Excel, you'll need different number ranges.

For English, these are ranges 65-90 (uppercase) and 97-122 (lowercase).

The English alphabet in one formula (Excel 365)
B2=CHAR(SEQUENCE(26,1,65))
ABC
1#UppercaseLowercase
21A=CHAR(SEQUENCE(26,1,65))a=CHAR(SEQUENCE(26,1,97))
32Bb
43Cc
54Dd
65Ee
76Ff
8………
9JoinedABCDEFGHIJKLMNOPQRSTUVWXYZ=CONCAT(CHAR(SEQUENCE(26,1,65)))abcdefghijklmnopqrstuvwxyz=CONCAT(CHAR(SEQUENCE(26,1,97)))

SEQUENCE(26,1,65) gives the codes 65…90, CHAR turns them into letters, and the list spills down. CONCAT joins them into one string. In older Excel: =CHAR(ROW(A65)) copied down 26 rows.

Letters with diacritics in the Windows-1252 code page take codes 192-255: À is 192, é is 233, ñ is 241, ü is 252. Keep in mind that this range is not letters only: 215 is the multiplication sign (×) and 247 is the division sign (÷), so a list built from consecutive numbers will include them.

Read more in the article: How to create an alphabet in Excel

Combinations with other functions

In combination with SEARCH, FIND, COUNT and ROW in an array formula, the CHAR function allows you to find alphanumeric characters in text.

It can also help extract or remove the last word in all cells.

Like the article? Help its author! Buy !SEMTools, it has lots of useful instruments to process text data.