CHAR Function in Google Sheets: Unlocking Character Codes

Unlock Google Sheets's potential with the CHAR function, a simple yet powerful tool for generating characters based on their numerical codes

Whether you’re adding special symbols to your data, creating custom formatting, or developing unique spreadsheet features, understanding how to use the CHAR function can greatly enhance your spreadsheet capabilities.

i-radius

This article will explain the basics of the CHAR function, illustrate its practical applications, and show you how to seamlessly integrate these characters into your projects.

Dive into the world of ASCII characters and discover how this function can bring a new level of sophistication to your Google Sheets tasks.

Key Usage of CHAR Function in Google Sheets

The CHAR function in Google Sheets is pivotal for creating special characters from ASCII codes. It is particularly useful for:

  • Embedding non-printable characters within text.
  • Generating formatted textual outputs.
  • Transforming numeric codes into their equivalent characters, enhancing data display.

Breaking Down CHAR Function: Syntax and Examples

In Google Sheets, the CHAR function is essential for generating special characters. It converts numeric ASCII codes into characters, aiding in data formatting and presentation. Below are the syntax and straightforward examples that illustrate its practical applications.

CHAR Function

The CHAR function converts numeric values into their corresponding special characters, such as symbols or emojis. This function is especially useful for inserting characters that are not easily typed on a keyboard, enhancing data presentation and readability.

Syntax of CHAR

The syntax of the CHAR function in Google Sheets is:

=CHAR(table_number)

Let’s break down what this parameter represents:

  • table_number: The numeric code of the character you want to retrieve from the current Unicode table, specified in decimal format.

Remember that table_number must be a decimal number (base 10). If you have Unicode values in hexadecimal format (base 16), you can use the HEX2DEC function to convert them into decimal before using CHAR. 

Example of CHAR

Integrating emojis into employee datasets using the CHAR function can create a more engaging and inclusive workplace. Suppose you want to display emojis next to the employee that relate closely and identify that personality to help reinforce the importance of individual personalities within the team.

=CHAR(128512)

Formula explanation:

  • CHAR(128512): This function converts the Unicode code point for the smiley face emoji (128512) into the actual character.
i-border

When you enter this formula in a cell, it will display the smiley face emoji 😀 next to "James Miller."

By integrating emojis into employee datasets using the CHAR function, organizations can cultivate a more engaging, inclusive, and communicative work environment.

Basic Examples of Using CHAR Function in Google Sheets

Discover how to skillfully manage and analyze text data in Google Sheets using the CHAR function. This function is key for adding special characters, aiding in the efficient organization and presentation of your data.

In this guide, we use an employee dataset from a company's sales department to demonstrate effective ways to leverage the CHAR function. The dataset includes essential details encoded in Unicode.

Combining Different Uses of the CHAR Function in Google Sheets

The CHAR function in Google Sheets is versatile, allowing you to insert various characters, from emojis and symbols to line breaks, based on Unicode values. Here’s how you can use the CHAR function to add an upward-pointing arrow, a currency symbol, and a line break in your datasets.

Suppose you have a dataset where the salary increments are kept in Unicode numbers. To find which employees' salaries have been increased, we can decode the codes with the CHAR function.

You can use the following formula:

=CHAR(C3)

Formula explanation:

  • CHAR: A function that converts a numeric Unicode value into its corresponding character.
  • C3: The cell that has the Unicode values.

i-border

In cases where Unicodes aren't mentioned, you can insert the arrow wherever it is required using =CHAR (UNICODE).Suppose you need to get the currency symbol of each employee's salary. 

You can use the CHAR function to decode the currency codes:

=CHAR(D3)

Formula explanation:

  • CHAR: A function that converts a numeric Unicode value into its corresponding character.
  • C3: The cell that has the Unicode value column for the currency symbol of employee salaries.
i-border

In cases where Unicodes aren't mentioned, you can insert the symbols wherever it is required using =CHAR (UNICODE).Suppose you want to format a cell with a description that spans two lines, such as for employee feedback.

You can use the CHAR function to insert a line break as follows:

="James builds strong client loyalty" & CHAR(10) & "by always exceeding expectations."

Formula explanation:

  • CHAR: A function that converts a numeric Unicode value into its corresponding character.
  • 10: The code for line break.
i-border

This formatting is ideal for adding clear, multi-line descriptions in reports within a single cell.

Advanced Techniques to Use CHAR Function

Discover advanced techniques for utilizing the CHAR function in Google Sheets to enhance text extraction, insert symbols, and manage data effectively. These methods allow for more detailed and precise data manipulation.

Create Complex Characters Across Multiple Cells with CHAR Function

Adding unique characters across cells in Google Sheets can enhance data representation, particularly in scientific or mathematical reports. The CHAR function allows you to generate these characters by using Unicodes, and you can also use cell references for added flexibility.

Suppose you need to insert the Greek uppercase sigma (Σ) in a cell. 

Use the CHAR function as follows:

=CHAR(931)
i-border

or

=CHAR(9138)
=CHAR(9139)

Formula explanation:

  • CHAR: Function that converts a Unicode code point to its character.
  • 931: generates the Greek uppercase sigma.
  • 9138 / 9139: The Unicode code point to generate a specific symbol.
i-border

When you enter these formulas in a cell, they display unique characters that look like Σ.

Create Headers with Arrows and Line Breaks Using CHAR Function

In datasets that track employee information, adding headers with directional arrows and line breaks can improve clarity and organization. The CHAR function in Google Sheets allows you to incorporate arrows and line breaks, providing a quick visual guide to data structure – like showing career progression horizontally and performance levels vertically.

Suppose you want to label a header with "Performance % (month)" and "Career Stage" on separate lines, including arrows to indicate direction.

You can use the following formula:

="Performance % (month) " & CHAR(8594) & CHAR(10) & "Career Stage "&CHAR(8595)

Formula explanation:

  • "Performance % (month) ": First line text for the header.
  • CHAR(8594): Adds a right arrow (→) symbol.
  • CHAR(10): Inserts a line break.
  • "Career Stage ": Second line text for the header.
  • CHAR(8595): Adds a downward arrow (↓) symbol.
i-border

This layout provides a clear, structured header, making it easy for users to understand the focus of each section.

Add Superscripts and Subscripts Using the CHAR Function

Incorporating superscripts and subscripts in your datasets can enhance the clarity and professionalism of your reports, especially in a business context. The CHAR function in Google Sheets allows you to add these formatting elements to text easily.

Example of superscript:

Suppose you want to label employee shifts in a way that stakeholders can clearly understand. Use the CHAR function to add a superscript to the word "Shift" for clarity.Here is the formula:

="Shift" & CHAR(185)

Here is what it means:

  • "Shift": This is the text label for the employee's shift.
  • CHAR(185): This function converts the Unicode number into 1 in superscript format, indicating that it is the first shift designation.
i-border

When you enter this formula in a cell, it will display Shift¹, signifying the first shift designation for James Miller. This formatting helps to draw attention to the shift number, making it more prominent in reports or dashboards.

Example of subscript:

To determine which employee works at which level, we can use the CHAR function again. For instance, to create a label that includes the word "Level" followed by the subscript "4" for James Miller's level, you would use the following formula:

="Level" & CHAR(8324)

Formula explanation:

  • "Level": This is the text label indicating the employee's level.
  • CHAR(8324): This function converts the number Unicode 8324 into the subscript format, visually distinguishing it from the main text.
i-border

When you enter this formula in a cell, it will display Level₄, clearly indicating the employee level designation. This formatting enhances the presentation of employee information, making it more structured and professional.

Concatenating Multiple Characters Using CHAR

The CHAR function in Google Sheets allows you to combine multiple symbols or characters by using their Unicode values. By using CHAR functions with the & operator, you can create customized text strings with symbols like currency signs, arrows, or emojis to enhance your data presentation.

Suppose you want to track salary trends and performance ratings in a single view. By using the CHAR function, you can concatenate arrows for salary changes and stars for performance, creating a quick visual summary for each employee.

Here is the formula:

=(CHAR(C3) & " " & CHAR(D3)

Formula explanation:

  • CHAR(C3): Reference to the cell containing Increment Status. 
  • &: Joins elements.
  • " ": Adds a space.
  • CHAR(D3): Reference to the cell containing Performance Code.
i-border

This format uses CHAR to add currency and performance symbols, making reports more visually informative and easier to interpret.

Combining CHAR with Other Formulas in Google Sheets

Unlock the full potential of Google Sheets by mastering how to combine the CHAR function with other formulas for dynamic data extraction, text manipulation, and custom formatting. This guide delves into integrating these functions to streamline workflows and develop tailored, powerful solutions within your spreadsheets.

Combine Text and Symbols Using the CHAR and CONCATENATE Function

Integrating symbols into text strings can make data more engaging and personalized. The CHAR function in Google Sheets allows you to easily add special characters, such as emojis, to text, creating a more visually appealing presentation.

Suppose the employee personality details are stored in codes in a database for data type storage limitations.

To get the emojis right beside the name for representation purposes, we will be using CHAR (to get the emojis) and CONCATENATE (to add the emojis beside the name). This is useful when bulk data is being combined.

Here is the formula:

=CONCATENATE(B3) & CHAR(C3)

Formula explanation:

  • B3: Column that has the names of the employees.
  • &: Joins the text and emoji.
  • C3: The cell that has the value of emoji.
i-border

The result will display James Miller😀, adding a personable element to the text.

Generate Characters with CHAR and ARRAYFORMULA with SEQUENCE Function

Combining CHAR, ARRAYFORMULA, and SEQUENCE functions in Google Sheets can enhance datasets with dynamically generated characters, symbols, or identifiers. This approach is specifically useful for adding visual elements or creating unique codes based on ASCII characters in datasets.

Suppose you want to create unique emoji symbols in a new column based on the Employee Name row position, adding a visual element for each employee description.

Here is the formula:

=ARRAYFORMULA(B3:B7 & " " & CHAR(128512 SEQUENCE(COUNTA(B3:B7), 1, 0, 1)) & " - " & C3:C7)

Formula explanation:

  • B3: Refers to the Employee Name column range.
  • SEQUENCE(COUNTA(B3:B7), 1, 0, 1): Generates a sequence of numbers starting from 0 up to the count of employee names, incrementing by 1 for each row.
  • COUNTA(B3:B7): Counts the number of non-empty cells in the Employee Name column, ensuring the sequence matches the data length.
  • CHAR(128512 + SEQUENCE(...)): Uses the sequence to dynamically assign unique emojis (starting with 😀, represented by ASCII 128512).
  • ARRAYFORMULA(...): Applies the entire formula across the specified range, adding symbols alongside each employee's name and description.
i-border

This formula adds a unique emoji character next to each Employee Name and combines it with the Description column. This method enhances the dataset by visualizing each row, making it easier to identify or categorize entries within Google Sheets.

Using CHAR as a Delimiter with JOIN Function

Using the CHAR function with JOIN in Google Sheets to combine multiple cell values into one using a specific delimiter. This is particularly helpful when displaying multiple entries separated by line breaks or other symbols. Here, we’ll use a line break delimiter to join the Employee Name values into a single cell. 

To combine cells with a line break as the delimiter:

=JOIN(CHAR(10), B3:B7)

Formula explanation:

  • B3: Refers to the range of cells in the Employee Name column.
  • CHAR(10): Represents a line break in ASCII, creating a new line between each cell’s content.
  • JOIN(...): Combines all values in the specified range, inserting a line break after each entry.
i-border

The output for Employee Name values in cell D3 is a combined list, with each name separated by a line break.

Filter Data with CHAR Function with QUERY

Incorporating the CHAR function within the QUERY function in Google Sheets allows you to filter data based on unique symbols or special characters, such as checkmarks, stars, or numeric values. This approach is useful when handling scores, ratings, or unique symbols in data filtering.

Suppose you want to use QUERY to filter the Employee Name and Renewal Status columns to display only rows that contain a checkmark (✓) character.

Here is the formula:

=QUERY(B2:C7, "SELECT B, C WHERE C = '" & CHAR(10003) & "'", 1)

Formula explanation:

  • B2:C7: Refers to the range containing the Employee Name and Renewal Status columns.
  • "SELECT B, C WHERE C = 9733": This QUERY command selects rows where the Renewal Status column matches the checkmark character.
  • CHAR(10003): Generates the checkmark symbol in the formula, ensuring the function dynamically references the symbol.
  • 1: Indicates that the first row contains headers.
i-border

The formula will filter and display only rows where the Renewal Status contains the checkmark (✓).This example highlights how to use the CHAR function to dynamically reference unique characters in conjunction with the QUERY function, making your data filtering more precise and adaptable.

Create a Star Rating System Using CHAR and REPT Functions

Combining the CHAR and REPT functions in Google Sheets to visually represent ratings as stars. This is particularly useful for displaying scores in an engaging, easy-to-read format.

Suppose you want to create a star rating system for employees based on their Score column, where each score translates into a corresponding number of stars.

Here is the formula:

=REPT(CHAR(9733), B2)

Formula explanation:

  • B2: Refers to the cell in the Score column, which indicates the number of stars.
  • CHAR(9733): Represents the star symbol (★) in ASCII.
  • REPT(CHAR(9733), B2): Repeats the star symbol according to the value in the Score column.
i-border

The output for James Miller with a score of 3 displays ★★★ as his star rating.

Troubleshooting Common Errors in LEFT, RIGHT, MID, LEN and CHAR Functions

While the CHAR function in Google Sheets is a powerful tool for data manipulation, encountering errors is not unusual. Understanding how to pinpoint and resolve these common issues is crucial for ensuring precise and accurate outcomes.

#VALUE!

⚠️ Error: The #VALUE! error in the CHAR function arises when the input ASCII code is invalid. This typically occurs if the input value is not within the acceptable ASCII range (1-255) or if a non-numeric input is provided.

✅ Solution: To fix this, ensure the ASCII code entered into the CHAR function is a numeric value within the range of 1 to 255. Double-check your inputs for accuracy and ensure they are appropriate for generating the desired character.

#NUM! Error

⚠️ Error: The #NUM! error occurs when using the CHAR function if the number argument provided is outside the valid ASCII range of 1 to 255. This error highlights that the input number is either too low, too high, or sometimes non-numeric.

✅ Solution: To correct the #NUM! error, verify that the ASCII code you input into the CHAR function is strictly a numeric value within the range of 1 to 255. Adjust any values that fall outside this range to ensure they fit within the acceptable limits for generating the corresponding character.

#N/A Error

⚠️ Error: The #N/A error occurs in the CHAR function when it references a cell or a range that does not exist, often due to a typo or incorrect range specification. This results in a reference error because the function cannot process an undefined or non-existing input.

✅ Solution: To resolve the #N/A error, ensure that all references within your CHAR function point to existing cells or ranges. Double-check for any typographical errors in your formula, and verify that all specified cells or ranges are defined and accessible within the spreadsheet. Adjust any references that are incorrect to ensure the CHAR function can retrieve the required numeric input and generate the desired character correctly.

#REF! Error

⚠️ Error: The #REF! error in the CHAR function occurs when a reference to a cell or range is invalid. This typically happens if the cell or range has been deleted, moved, or is incorrectly addressed in the formula, leading to a reference that Google Sheets cannot locate.

✅ Solution: To resolve the #REF! error, carefully check the formula to ensure that all cell references are correct and valid. Replace or correct any references to cells or ranges that have been altered or no longer exist. Ensuring accurate references in your CHAR function will prevent this error and allow the formula to execute properly.

#NAME? Error

⚠️ Error: The #NAME? error in the CHAR function appears when Google Sheets does not recognize the function name or a part of it. This usually happens if there's a typo in the function name or if an unrecognized function is mistakenly used.

✅ Solution: To resolve the #NAME? error, check the spelling of the CHAR function and any other functions or references it may use. Ensure that all function names are correct and that there are no extra spaces or incorrect characters. Correct any typos or errors in function names to ensure that Google Sheets can recognize and execute the function properly.

Best Practices to Follow When Using CHAR Function

Adhering to best practices when using the CHAR function in Google Sheets can greatly improve the efficiency and accuracy of your data manipulation. By following these recommended guidelines, you can optimize the effectiveness of your formulas and minimize the occurrence of errors.

Combine with Other Functions for Advanced Results

Integrating the CHAR function with other Google Sheets functions like SEARCH, IF, CONCATENATE, and ARRAY FORMULA expands your ability to manipulate data effectively. This combination facilitates complex text extractions, enhances readability, and enables deeper analyses, ultimately leading to more efficient and insightful data processing.

Apply Conditional Formatting

Conditional formatting in Google Sheets can enhance data visualization by applying styles based on values. Use the LEN function to highlight cells with excessive text length and the CHAR function to format cells containing specific characters or emojis, creating dynamic visual cues for easier data interpretation.

Double-Check Unicode Values in CHAR

When using the CHAR function in Google Sheets, it's crucial to double-check the Unicode values to ensure they correspond to the desired characters. Incorrect values can lead to unexpected results or errors. Verifying these codes helps maintain accuracy and enhances the overall effectiveness of your data presentation.

Essential Google Sheets Functions for Advanced Data Analysis

Learn about the full potential of Google Sheets, with key functions designed for in-depth data analysis. These powerful formulas streamline complex tasks, allowing you to manage large datasets, automate workflows, and effortlessly extract meaningful insights from your data. 

  • VLOOKUP: Searches for a value in the first column of a range and returns a corresponding value from a specified column, simplifying data retrieval from large datasets.
  • UNIQUE: Removes duplicates, providing a list of distinct values for cleaner analysis and identifying unique data points.
  • PIVOT: Automatically summarizes data with pivot tables, helping you report, organize, and visualize trends effortlessly.
  • IMPORTRANGE: Imports data from external Google Sheets, consolidating multiple sources into one, streamlining your data analysis.
  • MATCH: Finds the position of a value within a range, useful for dynamic lookups when combined with other functions like INDEX.
  • COUNTA: Counts non-empty cells in a range, giving a quick overview of your dataset’s size and density.
  • HLOOKUP: Searches for a value in the first row of a range and returns a corresponding value from a specified row, enabling horizontal data lookups.
  • LOOKUP: Searches for a value in a range and returns a corresponding value from another range, useful for flexible data retrieval in various contexts.

Gain Insights with OWOX: Reports, Charts & Pivots Extension

The CHAR function opens up creative possibilities for working with special characters, but why stop there? The OWOX Reports Extension for Google Sheets enhances your capabilities by automating data workflows, generating insightful reports, and effortlessly creating visualizations.

It’s the perfect companion for anyone looking to maximize productivity and streamline data analysis. Install the OWOX Reports Extension for Google Sheets today and discover a smarter way to work with your data!

FAQ

You might also like

2,000 companies rely on us

Oops! Something went wrong while submitting the form...