Hex to Ascii conversion formula in Excel

Kevalson

New Member
Joined
Apr 16, 2002
Messages
22
Office Version
  1. 2013
Platform
  1. Windows
I know you can create a DEC2HEX formula.
I wanted to convert Hex to Ascii.

When I use HEX2DEC, it puts the ASCII number instead of the actual character.

For instance, if I put the HEX number 4A in Cell A1, I want Cell A2 to display a capital J instead of the number 74 which is J in ASCII.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hey there,

I just thought I would add this - I have 32 bit HEX that I needed to conver to ASCII so just took this a bit further. If you have less than 32 BIT HEX, it will error, just use less of the code:

:)
=CONCATENATE((CHAR(HEX2DEC(MID(A2,1,2)))),(CHAR(HEX2DEC(MID(A2,3,2)))),(CHAR(HEX2DEC(MID(A2,5,2)))),(CHAR(HEX2DEC(MID(A2,7,2)))),(CHAR(HEX2DEC(MID(A2,9,2)))),(CHAR(HEX2DEC(MID(A2,11,2)))),(CHAR(HEX2DEC(MID(A2,13,2)))),(CHAR(HEX2DEC(MID(A2,15,2)))),(CHAR(HEX2DEC(MID(A2,17,2)))),(CHAR(HEX2DEC(MID(A2,19,2)))),(CHAR(HEX2DEC(MID(A2,21,2)))),(CHAR(HEX2DEC(MID(A2,23,2)))),(CHAR(HEX2DEC(MID(A2,25,2)))),(CHAR(HEX2DEC(MID(A2,27,2)))),(CHAR(HEX2DEC(MID(A2,29,2)))),(CHAR(HEX2DEC(MID(A2,31,2)))))

This is for 16 bit data HEX to ASCII

=CONCATENATE((CHAR(HEX2DEC(MID(A2,1,2)))),(CHAR(HEX2DEC(MID(A2,3,2)))),(CHAR(HEX2DEC(MID(A2,5,2)))),(CHAR(HEX2DEC(MID(A2,7,2)))),(CHAR(HEX2DEC(MID(A2,9,2)))),(CHAR(HEX2DEC(MID(A2,11,2)))),(CHAR(HEX2DEC(MID(A2,13,2)))),(CHAR(HEX2DEC(MID(A2,15,2)))))
 
Upvote 0
Does this work? I am in a bit of a rush, but thought that might do it?

=CHAR(DEC2HEX("4A"))

=CONCATENATE((CHAR(DEC2HEX(MID(A2,1,2)))),(CHAR(DEC2HEX(MID(A2,3,2)))),
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top