CHARformula returns the character corresponding to the ASCII code provided. This formula is commonly used to convert a numerical value to its corresponding character in a Google Sheets cell.
- How to use
- Examples of using
CHARformula not working?
- Similar formulas to
CHAR formula with the syntax shown below, it has 1 required parameter:
- table_number (required):
The ASCII code number of the character to be returned. Must be a number between 0 and 255.
ExamplesHere are a few example use cases that explain how to use the
CHARformula in Google Sheets.
Convert numerical values to characters
CHAR formula can be used to convert numerical values to their corresponding characters. For example, the formula
=CHAR(65) returns the letter 'A'.
Insert special characters
CHAR formula can be used to insert special characters into a Google Sheets cell. For example, the formula
=CHAR(10) inserts a line break into the cell.
Create custom codes
CHAR formula can be used to create custom codes for data entry in a Google Sheets cell. For example, the formula
=CHAR(10001) could be used to represent a specific product code.
CHARnot working? Here are some common mistakes people make when using the
CHARGoogle Sheets Formula:
Using a number outside the valid range
The number provided to
CHAR must be between 1 and 255, inclusive. If a number outside this range is used, an error will be returned.
Forgetting to enclose the number in parentheses
The number that corresponds to the character you want to return must be enclosed in parentheses. If it is not, an error will be returned.
The following functions are similar to
CHAR or are often used with it in a formula:
CODEformula returns the numeric Unicode value of the first character in a text string. This can be useful when working with non-English characters or when attempting to identify certain characters in a text string.
UNICHARfunction returns the Unicode character represented by the given numeric value. This is useful when working with non-Latin characters or symbols that cannot be easily typed on a keyboard. The function takes a single parameter, a number representing the Unicode value of the character to be returned.
ASCfunction returns the numeric code of the first character of a text string. This function is commonly used to sort a list of text strings in alphabetical order based on the numeric code of their first character.
The CONCATENATE function in Google Sheets is used to combine text strings from different cells or inputted directly in the formula. It takes one or more text strings as input and returns a single concatenated string. This function is commonly used to combine first and last names, or to merge data from multiple cells into a single cell.
SUBSTITUTEformula is used to replace specific text in a string with new text. It is commonly used to replace all occurrences of a certain word or character within a larger string. The formula has the option to specify which occurrence to replace, or it will replace all occurrences by default.
You can learn more about the
CHAR Google Sheets function on Google Support.