CHAR Function in Excel (Table of Contents)
CHAR Function in Excel
CHAR means CHARACTER. In Excel CHAR, the function is a TEXT formula that returns the character, which is specified by the numbers from 1 to 255.
These characters are inbuilt by the Microsoft based on the numbers that we supply. It is very useful to insert characters to our strings while writing something.
These characters ordinarily cannot type from our normal keyboard. Instead, we need to use CHAR function.
To use this CHAR function we need to know which number inserts which character. Then only we can use the CHAR function.
These are ASCII code of a character. ASCII stands for American Standard Code for Information Interchange.
CHAR and CODE are a closely related function in excel. We will discuss that in the later part of the article.
CHAR Formula in Excel
The CHAR Formula in Excel is as follows:
The Formula of CHAR function involves only one argument i.e. number
Number: It is the integer number ranging from 1 to 255.
This argument can be given cell reference as well as direct supply to the argument. Since we only need to supply number as an argument we need not specify the number along with double quotes.
How to Use CHAR Function in Excel?
This CHAR is very simple easy to use. Let us now see how to use the CHAR Function in Excel with the help of some examples.
Firstly, we need to look into which number specifies which character. Below list tells associated character for each number.
CHAR number 1 unleashes nothing i.e. empty cell but only for the outset. There is always a character in it. You can use LEN formula to check.
Example #2 – Insert Line Breaker by Using CHAR Function in Excel
Assume you are working in a college as an assistant. You have a list of all the students and you need to post the attendance report to their respective homes. You have addressed in three different columns and you need to merge those 3 into 1 column and insert line breakers after each and every column.
In column G, you need to combine the full address by giving line breaker after each address.
We can insert the line breaker by using the CHAR function. Important to know that which number we need to use to insert a line breaker.
Number 10 we need to use to insert the line breaker after each address column.
Initially, our data looks like this. One tuning we need to do here. The tuning is we need to wrap the text to see the difference.
Now, see how your address column looks.
Example #3 – Insert Alphabets by Using CHAR Function in Excel
We can insert alphabets by using CHAR function. Below are the lists of numbers to insert alphabets.
Apply these codes in excel to see the magic.
Now we have inserted UPPER case alphabets. In order to insert LOWER case alphabets, we need to use the below codes.
Example #4 – Alternative Method to Insert Characters
We can insert those CHARACTERS by using keyboard too. Below is the list of those keys.
Example # 5 – Combination of CHAR with SUBSTITUTE Function
Assume you have downloaded the below data from the web and you need to remove all those line breakers and special characters from this.
In order to remove those special characters and remove line breakers we can use SUBSTITUTE function.
We have used three-nested SUBSTITUTE function to remove special characters and line breakers.
Things to Remember About in CHAR Function
- CODE function can return the number if you give the special character as a reference. For example, =CODE (“A”) will return 65 as the answer.
- First 32 characters are non-printable characters that can be removed by using a CLEAN function in excel.
- We can insert the characters by using ALT + numbers instead of the CHAR formula.
- If the supplied number is not triggered then we will get #VALUE! Error i.e. numbers more than 255.
- If the supplied is the number is not in the numeric format we will get the same error.
You can download this CHAR Function in Excel template here – CHAR Function Excel Template
This has been a guide to CHAR Function. Here we discuss the CHAR Formula and how to use CHAR Function in Excel along with excel example and downloadable excel templates. You may also look at these useful functions in excel –