Share in Facebook


12 April 2018

CHAR Function


Today I will discuss about a very small function but a very useful and user friendly function, the CHAR Function.

This small but powerful function returns the character from ASCII value. Let us first know what is ASCII Code very briefly then we will move to the CHAR function in detail.

What is the ASCII Code ?


ASCII (American Standard Code for Information Interchange) is the most common format for text files in computers and on the Internet. In an ASCII file, each alphabetic, numeric, or special character is represented with a 7-bit binary number (a string of seven 0s or 1s). 128 possible characters are defined.

Why do we need ASCII Code ?


When any key on a keyboard is pressed, it needs to be converted into a binary number so that it can be processed by the computer and the typed character can appear on the screen. A code where each number represents a character can be used to convert text into binary. One code we can use for this is called ASCII.

ASCII stores few special characters like @,#,$ etc., and numeric and alphabets. To sum up you can call ASCII code is such a code which stores all the available characters in a Keyboard in number form. 

If you are interested to know which number represents which character, you must use the CHAR function in Excel.

Syntax

The syntax for the CHAR function in Microsoft Excel is:
=CHAR(number)

Parameters or Arguments
number

A number from 1 to 255.

Returns

The CHAR function returns a string/text value.

How to use CHAR Function ?

As shown in the below image, write a number in any cell in Excel, in the next cell type ‘=CHAR(A1)’, press enter.

In the below image, I entered 100 in A1 cell and next to this cell I typed =cell(A1) which returns the character ‘d’. Therefore, we can conclude that the ASCII value of ‘d’ is 100.

How to Use CHAR Function in Excel
How to Use CHAR Function in Excel


If you are interested to know characters that ASCII code represents you need to enter 1 to 255 in a column, then write the CHAR function and drag it. It will represent all the characters and their ASCII code.

For example, CHAR(10) represents a line break in Windows, CHAR(13) returns a line break in Mac.
CHAR(39) represents a single quote, CHAR(34) represents double quote. CHAR(149) represents a bullet.

In the next article I will show you how useful this function is !!!
Below I have given few useful ACSCII codes and their characters in a table format.

Some Useful ASCII Codes and the CHARACTERS they represent
Some Useful ASCII Codes and the CHARACTERS they represent

Hope this article is enough for you to understand the CHAR function and ASCII Codes in Microsoft Excel. If any question arises, feel free to comment in the comment box below.

Thanks for reading…

No comments: