Convert decimal to 64-bit hex?

Anonymous
2016-10-11T06:41:20+00:00

If I have a text string containing the number "1311768467294899695", how can I convert this into a hex number?

Notice that the decimal in the text string is more than Excel's usual limit of 15 digits.

The result of converting the above number (string) into hex will be "1234567890ABCDEF"

Converting the number "18446744073709551615" would be "FFFFFFFFFFFFFFFF".

How do I convert long decimals into 64-bit hex in Excel?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Anonymous
    2016-10-11T07:03:43+00:00

    Hi Pistolprinsen,

    If I have a text string containing the number "1311768467294899695", how can I convert this into a hex number?

    Notice that the decimal in the text string is more than Excel's usual limit of 15 digits.

    The result of converting the above number (string) into hex will be "1234567890ABCDEF"

    Converting the number "18446744073709551615" would be "FFFFFFFFFFFFFFFF".

    How do I convert long decimals into 64-bit hex in Excel?

    See:

    http://stackoverflow.com/questions/21246303/how-do-i-convert-a-64bit-number-to-hexadecimal-in-excel

    ===

    Regards,

    Norman

    0 comments No comments
  2. Anonymous
    2016-10-11T10:51:22+00:00

    Thanks, Norman, but that solution only works with numbers (up to 15 digits, which is Excel's limit).

    I'm looking for a way to convert 'numbers' lagers than 15 digits in the form of a text string containing the numbers.

    I'm begining to guess some sort of VBA/UDF is needed...

    0 comments No comments
  3. Anonymous
    2016-10-11T11:00:18+00:00

    Hi Pistolprinsen,

    Thanks, Norman, but that solution only works with numbers (up to 15 digits, which is Excel's limit).

    I'm looking for a way to convert 'numbers' lagers than 15 digits in the form of a text string containing the numbers.

    I'm begining to guess some sort of VBA/UDF is needed...

    Look at the last post in the indicated thread:

    '---------->>

    This will work up to decimal value of 18,446,744,073,709,500,000 or hex value of 0xfffffffffffff800.

    [cut]

    '<<----------

    ===

    Regards,

    Norman

    0 comments No comments
  4. Anonymous
    2016-10-11T11:49:34+00:00

    ...and, look at the number: 18,446,744,073,709,500,00.

    Only the first 15 digits are included - the rest will be rounded to zeros, like Excel does with all number with more than 15 digits!

    The method will not be accurante with a number like 18,446,744,073,709,551,615

    as I requested, since this number will be interpretated as 18,446,744,073,709,500,000

    because only the first 15 digits will be recognized, and the rest will just be zeros.

    However, as I mentioned - a quick UDF did the trick :-)

    Thanks for trying anyway :-)

    0 comments No comments