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

Setting Table Values to Three Decimal Places

If you import information into a document from another program, the values you import may not be exactly to your liking. ...

Discover More

Disabling Page Layout View

Excel allows you to display your workbooks using a couple of different views. If you want to disable one of the views, it ...

Discover More

Creating Two Versions of the Same Document

You may often need to create two versions of the same document, one with everything and the other with a subset of what ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Using a Week Number as One Criterion in a Formula

The SUMIFS function can be quite powerful in conditionally summing information based on criteria you specify. This tip ...

Discover More

Phantom Counts

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

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 8 + 7?

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.