HEX2DEC Function
The HEX2DEC
function in Google Sheets converts a hexadecimal number to its decimal equivalent.
Syntax
HEX2DEC(signed_hexadecimal_number)
signed_hexadecimal_number
: The hexadecimal number you want to convert. This is a required parameter.
Examples
- Basic Conversion
Convert the hexadecimal number ‘1A’ to decimal:
=HEX2DEC("1A")
This will output 26.
- Conversion of a Negative Number
Convert the hexadecimal number ‘-F’ to decimal:
=HEX2DEC("-F")
This will output -15.
- Conversion of a Long Hexadecimal Number
Convert the hexadecimal number ‘ABCDEF’ to decimal:
=HEX2DEC("ABCDEF")
This will output 11259375.
Notes
- The HEX2DEC function can handle hexadecimal numbers up to 10 characters long.
- Negative hexadecimal numbers are represented with a leading ’-’ sign.