ReferenceFunctionsEngineering Functions
HEX2DEC
HEX2DEC: Converts a hexadecimal text value to decimal.
Summary
Supports up to 10 hex digits, including signed two's-complement values.
Remarks
- Input is coerced to text and must contain only hexadecimal characters.
- 10-digit values beginning with
8-Fare interpreted as signed 40-bit numbers. - Returns
#NUM!for invalid characters or inputs longer than 10 digits.
Examples
Convert a positive hex value
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
255
Interpret signed 40-bit hex
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
-1
Related functions
FAQ
When is a 10-digit hex input treated as negative in HEX2DEC?
If the first digit is 8 through F, it is decoded as signed 40-bit two's-complement.
Runtime metadata
Category
Engineering
Signature
HEX2DEC(arg1: Any)Arity
min 1, max 1
Arguments
arg1Any · Scalar
Caps
PURE
Source