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

Adding a Macro to the Quick Access Toolbar

One of the easiest ways to quickly access a macro is to assign it to the Quick Access toolbar. Here's how you can make ...

Discover More

Where Do You Want Your Endnotes?

Endnotes can be placed in a couple of different places in your document, not just at the very end. Here's how you can ...

Discover More

Printing without Opening

Want to print one ore more workbooks without the need of actually opening the file? It's easy to do when you rely on ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (ribbon)

EOMONTH Function is Flakey

Some users have reported problems using the EOMONTH function in later versions of Excel, beginning with Excel 2007. The ...

Discover More

Using the ABS Function

Need to find the absolute value of a number? That's where the ABS function comes into play.

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
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 5 + 9?

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.