![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 11
|
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. |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Posts: 124
|
=CHAR(HEX2DEC("4A"))
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Jun 2008
Location: Auckland, NZ
Posts: 14
|
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,1 5,2)))),(CHAR(HEX2DEC(MID(A2,17,2)))),(CHAR(HEX2DEC(MID(A2,19,2)))),(CHAR(HEX2DEC(MID(A2,21,2)))),(CHAR(HEX2DEC(MID(A2,2 3,2)))),(CHAR(HEX2DEC(MID(A2,25,2)))),(CHAR(HEX2DEC(MID(A2,27,2)))),(CHAR(HEX2DEC(MID(A2,29,2)))),(CHAR(HEX2DEC(MID(A2,3 1,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,1 5,2))))) |
|
|
|
|
|
#4 |
|
New Member
Join Date: Nov 2011
Posts: 1
|
Thanks man,
I need to do reverse in excel - want to convert -- TEXT to HEX Appreciate your help Regards, |
|
|
|
|
|
#5 |
|
New Member
Join Date: Jun 2008
Location: Auckland, NZ
Posts: 14
|
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)))), |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|