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

Deleting Every X Rows without a Macro

Grab some info from a source other than Excel, and you may find the need to delete a certain pattern of rows from a ...

Discover More

Locking the Position of Tools

Don't want your toolbar tools to move around on you? You might think you are out of luck, but here is a way you can make sure ...

Discover More

Finding and Changing Word's Internal Commands

If you know how to create macros, you can easily create entire replacements for Word's internal commands. Here's all you need ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Using the INT Worksheet Function

The INT function allows you to convert a value to an integer. The effect the function has depends on the characteristics of ...

Discover More

Counting the Number of Blank Cells

If you need to count the number of blank cells in a range, the function to use is COUNTBLANK. This tip discusses the ...

Discover More

Calculating the Day of the Year

Need to know what day of the year a certain date is? You can figure it out easily using the formulas in this tip.

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 3 + 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.