+ Reply to Thread
Results 1 to 19 of 19

DEC2HEX - HEX2DEC Issues - Number too Long?

Hybrid View

  1. #1
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,453

    Re: DEC2HEX - HEX2DEC Issues - Number too Long?

    Note that numbers that large go beyond standard double precision (~15 digits) that Excel uses to store numbers. If you need more than double precision can hold, you will need to figure out exactly how you want to do this -- which will probably depend a lot on what you are doing with these numbers.

    If you need to perform calculations on these numbers, you may consider peforming all calculations and storage in VBA using a Decimal data type that can store integers up to about 29 digits (see here for limits of different data types: https://msdn.microsoft.com/en-us/lib...=vs.60%29.aspx ).

    If there are not calculations needed, you may use VBA to convert from hexadecimal into a Decimal data type (not double or integer or long), then convert that Decimal data type to string and store the "numbers" in Excel as strings (though you may need to take extra measures to make sure Excel does not convert the "numbers as text" into numbers and truncate them to the limits of double precision).

    I'm sure there are other strategies as well. You are dealing with very large numbers here. Large enough that you will need to pay careful attention to data type and the limits imposed on those data types by whatever programming language you choose to use.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  2. #2
    Registered User
    Join Date
    07-17-2014
    Location
    Farmington, mi
    MS-Off Ver
    2010
    Posts
    23

    Re: DEC2HEX - HEX2DEC Issues - Number too Long?

    Hello mrShorty.

    This may be a repeated message - I sent a reply but I cannot see it.


    I apologize! I am a layman when it comes to excel- a lot of what you just said went way over my head. I am reviewing the link you posted and it seems like this is not possible without extensive knowledge on excel formulas.

    I do not need to do anything else but translate the DEC number (ex: 45317471814165458) to the HEX version (ex: A10000219A23D2). I have a list of 3000 DEC numbers.

    Am I better off just entering each into the calculator in PROGRAMMER mode and translating each individual number to HEX? Or is it possible to translate the whole list via excel?

    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] DEC2HEX Failing within Macros
    By klotzy in forum Excel General
    Replies: 13
    Last Post: 09-28-2016, 10:17 AM
  2. Number format to Display 20 character long number.
    By SamCV in forum Excel General
    Replies: 6
    Last Post: 07-09-2014, 08:19 PM
  3. [SOLVED] =IF and =SUMIF formulas creating long long long data processing times.
    By comp in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 03-26-2014, 02:59 PM
  4. Hex2Dec and Dec2Hex don't work
    By Robin Clay in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-17-2013, 07:24 PM
  5. Long running vb/a code Issues
    By toddbailey in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-03-2012, 06:01 PM
  6. Long Number Col
    By JXBlack in forum Excel General
    Replies: 1
    Last Post: 01-26-2010, 09:28 PM
  7. Changin =DEC2HEX conversion
    By ConfusedTech in forum Excel General
    Replies: 7
    Last Post: 12-19-2007, 02:09 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1