Results 1 to 4 of 4

number conversion

This is a discussion on number conversion within the Excel Questions forums, part of the Question Forums category; i always receive 'NUMBER error when convert long number when using bin2hex, dec2hec function...how to solve this problem?...

  1. #1
    Board Regular
    Join Date
    Aug 2006
    Posts
    79

    Question number conversion

    i always receive 'NUMBER error when convert long number when using bin2hex, dec2hec function...how to solve this problem?

  2. #2
    MrExcel MVP AlphaFrog's Avatar
    Join Date
    Sep 2009
    Posts
    11,868

    Default Re: number conversion

    BIN2HEX(number,places)

    Number is the binary number you want to convert. Number cannot contain more than 10 characters (10 bits). The most significant bit of number is the sign bit. The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement notation.

    Places is the number of characters to use. If places is omitted, BIN2HEX uses the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).


    DEC2HEX(number,places)

    Number is the decimal integer you want to convert. If number is negative, places is ignored and DEC2HEX returns a 10-character (40-bit) hexadecimal number in which the most significant bit is the sign bit. The remaining 39 bits are magnitude bits. Negative numbers are represented using two's-complement notation.

    Places is the number of characters to use. If places is omitted, DEC2HEX uses the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).

    Remarks:
    • If number < -549,755,813,888 or if number > 549,755,813,887, DEC2HEX returns the #NUM! error value.
    • If number is nonnumeric, DEC2HEX returns the #VALUE! error value.
    • If DEC2HEX requires more than places characters, it returns the #NUM! error value.
    • If places is not an integer, it is truncated.
    • If places is nonnumeric, DEC2HEX returns the #VALUE! error value.
    • If places is negative, DEC2HEX returns the #NUM! error value.

  3. #3
    Board Regular
    Join Date
    Aug 2006
    Posts
    79

    Default Re: number conversion

    so excel limitation???any other method to make conversion automatically?

  4. #4
    MrExcel MVP
    Moderator
    xenou's Avatar
    Join Date
    Mar 2007
    Location
    Clev. OH, USA
    Posts
    14,140

    Default Re: number conversion


    Using: Office 2007/Win7 (work) Office 2010/Win7 (home)

    You are rich in proportion to the number of things you can let alone.
    -- Henry David Thoreau

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