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 June 6, 2018)

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

Removing Blank Pages at the End of Your Document

You go to print out your document, and all of a sudden notice that there was a blank page that printed at the end. This ...

Discover More

Phantom Counts

Two common worksheet functions used to count things are COUNT and COUNTA. Not understanding how these functions treat ...

Discover More

Editing Graphic Objects

Want to change the way that a graphics object appears in your worksheet? You need to edit it, then, using the techniques ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (ribbon)

Returning the MODE of a Range

The MODE function is used to determine the most frequently recurring value in a range. This tip explains how to use the ...

Discover More

Converting to Hexadecimal

Excel allows you to easily convert values from decimal to other numbering systems, such as hexadecimal. This tip explains ...

Discover More

Nesting IF Worksheet Functions

The IF worksheet function is very handy to make conditional evaluations. You are not limited to a single IF comparison, ...

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 6 - 3?

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.