Hex to Ascii conversion formula in Excel
Attend Excelapalooza
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Hex to Ascii conversion formula in Excel

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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. #2
    Board Regular
    Join Date
    Apr 2002
    Posts
    124
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    =CHAR(HEX2DEC("4A"))

  3. #3
    New Member
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Hex to Ascii conversion formula in Excel

    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. #4
    New Member
    Join Date
    Nov 2011
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Re: Hex to Ascii conversion formula in Excel

    Thanks man,

    I need to do reverse in excel - want to convert -- TEXT to HEX

    Appreciate your help

    Regards,

  5. #5
    New Member
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Hex to Ascii conversion formula in Excel

      
    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)))),

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com