How to Use Excel's Char Function

By eHow Computers Editor

Rate: (0 Ratings)

Excel's Char function determines the character specified by the number of a character set. This will be the Macintosh character set for Macintosh computers and the ANSI character set for Windows computers. Char is frequently used to translate character codes in data that is imported from other computers. The following steps will show how to use Excel's Char function.

Instructions

Difficulty: Easy

Step1
Learn the syntax for Char. It is Char (number) where number is the character set number for which you wish to know the character. Char will return the corresponding character from the character set being used by your computer.
Step2
Use any data type for the argument to Char so long as it resolves to a numeric value. The Char function will return the #Value! error code if its argument is not an integer between 1 and 255 inclusive. From this restriction, we see that Char supports up to and including an eight-bit character set (2^8=256).
Step3
Look at the following simple examples for uses of Char: Char(65)=A, Char (66)=B, Char (67)=C and so on. These results assume that you are running Excel on a Windows computer.
Step4
Examine other uses of the Code function.

Char (CODE("A"))=A. Note this use to show that Char is the inverse function of Code.
Code (256) = #Value!. Although the argument is a number, it is outside the allowable range and therefore returns the #Value! error code.
Step5
Study the ASCII character set to check the results of Char. Note that character values 0 to 31 are unprintable and are represented by a small square in Windows.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article:  How to Use Excel's Char Function

eHow Computers Editor

eHow Computers Editor

Category: Computers

Articles: See my other articles

Related Ads