Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Converting Codes to Characters.

Converting Codes to Characters

by Allen Wyatt
(last updated November 1, 2014)

3

Computers store information internally using numeric values. The information we see on our screens, as characters, is nothing but a conversion of those numbers into the characters associated with those numbers. Excel includes a built-in worksheet function that allows you to convert numeric values into their associated characters, as follows:

=CHAR(A3)

This example function converts the numeric value at A3 to its corresponding character. The conversion is done using an extended ASCII character set. For instance, if A3 contained the value 65, then this function would return the capital letter A.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10425) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Converting Codes to Characters.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Developing Reciprocal Conversion Formulas

When converting between measurement systems, you might want to use two cells for each type of measurement. Make a change in ...

Discover More

Changing the User Interface Language

Tired of Windows showing you information in English when you'd much prefer a different language? Here's how to modify the ...

Discover More

Changing Vertical Cell Alignment

If you have a large row height, you may want to adjust how the information in a cell is aligned vertically. Sheets allows you ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Random Numbers in a Range

Excel provides several different functions that you can use to generate random numbers. One of the most useful is the ...

Discover More

Specifying a Language for the TEXT Function

You may want to use Excel to display dates using a different language than your normal one. There are a couple of ways you ...

Discover More

Strange ATAN Results

You may use Excel's trigonometric functions to do some quick calculations, and suddenly notice that the results in your ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is nine more than 8?

2016-10-26 14:49:32

Willy Vanhaelen

@Robin

This formula will do if the numbers are always 3 digits:

=MID("XJVHMSCZBP",LEFT(A1,1)+1,1)
&MID("XJVHMSCZBP",MID(A1,2,1)+1,1)
&MID("XJVHMSCZBP",RIGHT(A1,1)+1,1)

If de numbers can have any number of digits you can only use a user defined function:

Function MyCode(R As Range)
Const S = "XJVHMSCZBP"
Dim X As Integer, Y As Integer
For X = 1 To Len(R)
Y = Mid(R, X, 1) + 1
MyCode = MyCode & Mid(S, Y, 1)
Next X
End Function

In either case if the numbers can start with one or more zeros you have to format those cells as text or start the entry with an apostrophe.


2016-10-25 11:55:41

Robin

What formula do I use in Excel to convert numbers into an alpha code, where 1=J, 2=V, 3=H, 4=M 5=S, 6=C, 7=Z, 8=B, 9=P and 0=X. For example, the number 152 would be JSV in my code.


2014-11-04 11:44:33

Glenn Case

Note that for VBA, the equivalent function is CHR()


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.