Forum Discussion

anupambit1797's avatar
anupambit1797
Iron Contributor
Jul 16, 2023
Solved

HEX2DEC Issue

Dear Experts,

                     Greetings!

                     In attached sheet I want to convert Hex to Decimal, but somehow in Column "D", I am getting "#NUM" Error:-

 

 

Please suggest.

Thanks in Advance,

Br,

Anupam

5 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    anupambit1797 

    In general it works

    As variant you may have extra non-printable characters in C1. What =LEN(C1) returns?

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        anupambit1797 

        If you copy/paste that from web, most probably there is non-breaking space (code 160) within text. Something like

        =HEX2DEC( LEFT(C1,2) )

        could work.

        Or you may ignore column C and take texts from B

        =HEX2DEC( MID(B1,9,2) )
  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    anupambit1797 

    I asked my secret contact at Microsoft and his answer was:

    If the value is not a valid hexadecimal number, HEX2DEC returns the #NUM! error.

     

Resources