Decimal To Ascii In Excel

Hmmm I'm not sure then, because I just tried =CHAR(B1) in cell A1 and it returned exactly what I was expecting when I typed a number in B1
 
Last edited:
Let me be a little more clear. I'm getting a number in decimal from CLX that represents an Ascii text. When you change the data style in the monitor tag you can see the Ascii. Ex, 17323 is CO in Ascii. Can this be done in Excel?
 
Steve,

=Text( ) will convert a number e.g. 65 to the text 65
=Char( ) will convert a number to its ASCII character code e.g. 65 becomes A

Perhaps a bit more detail as to what you want to accomplish?
 
Yes Here's what I posted on Microsoft TechNet

I have created a spread sheet to track paper rolls as they move down the wharehouse. I am getting data from a ControlLogix processor via RSLinx and Topic Configuration. The problem is that I can display the roll order number in 5 cells as decimal numbers from the CLX but it represents an Ascii code.
Ex. Roll # CO 3G 03 06 3A is displayed in excel as 17200 13127 12339 12342 13121. Is there a formula function that can convert the decimal #'s so I can see the actual roll number in Ascii?
 
It's what the guy that programmed it used. I'm a troubleshooter trying to figure out where the data for the rolls are getting screwed up. The Exces spreadsheet I made has helped me find 6 errors in the code so far.
 
OK, How about this:
=CONCATENATE(CHAR(HEX2DEC(LEFT(DEC2HEX(B5),2))),CHAR(HEX2DEC(MID(DEC2HEX(B5),3,2))))

There is probably an easier method. :)
This will need some more logic if the number does not represent two ASCII characters.

Good luck.
 
Last edited:

Similar Topics

Do any of you Excel gurus know of a VB code or function that will convert ASCII text into it's decimal equivalent? I'm not VB savy at all. I...
Replies
3
Views
5,830
Hello, I have a SINT array I am receiving and one of the positions of this array contains the direction of the product. Inside the ladder...
Replies
4
Views
1,121
Hello everyone!, I am having a problem encoding decimals to ASCII, I need to store all 256 decimal characters (0-255) but ASCII encoded in Sting...
Replies
12
Views
3,611
I am using a ControlLogix processor to serially readback data from a QuickSilver servo drive. The ASCII response I get back is as follows: # 01...
Replies
1
Views
3,286
H
Dear all, i have to convert ASCII code into decimal or hexadecimal in my twido PLC using ladder diagram because the data that i send from my pc...
Replies
0
Views
4,419
hosana
H
Back
Top Bottom