Formualizer Docs
ReferenceFunctionsEngineering Functions

DEC2HEX

DEC2HEX: Converts a decimal integer to hexadecimal text.

Summary

Optionally pads the result with leading zeros using places.

Remarks

  • number is coerced to an integer and must be in [-2^39, 2^39 - 1].
  • Negative values are returned as 10-digit two's-complement hexadecimal strings.
  • places must be at least the output width and at most 10, or #NUM! is returned.

Examples

Convert decimal to hex
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
FF
Pad hexadecimal output
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
001F

FAQ

How are negative values formatted by DEC2HEX?

Negative outputs use 10-digit two's-complement hexadecimal representation.

Runtime metadata

Category

Engineering

Signature

DEC2HEX(arg1: Number, arg2…: Number)

Arity

min 1, max variadic

Arguments

arg1

Number · Scalar · coercion NumberLenientText

arg2

Number · Scalar · coercion NumberLenientText

Caps

PURE

Source

On this page