Spread.NET 17 Formula Reference
Formula Functions / Functions D to G / DEC2HEX
In This Topic
    DEC2HEX
    In This Topic

    This function converts a decimal number to a hexadecimal number.

    Syntax

    DEC2HEX(number,places)

    Arguments

    This function has these arguments:

    Argument Description
    number Decimal numeric value to convert in the range of -549,755,813,888 to 549,755,813,887
    places [Optional] Number of characters to return; if not an integer, the number is truncated

    If places argument is omitted, the calculation uses the minimum number of characters necessary. This argument is useful for adding leading zeros to the result.

    Remarks

    An error value is returned if the number is non-numeric or outside the range, or if the places value is non-numeric, negative, or too small.

    Data Types

    Accepts numeric data. Returns numeric data.

    Examples

    DEC2HEX(103,4)

    Version Available

    This function is available in product version 2.0 or later.

    See Also

    DEC2BIN | DEC2OCT | BIN2HEX | OCT2HEX | Engineering Functions