Converts a hexadecimal number to a decimal number.
Deze functie werkt in Google Spreadsheets hetzelfde als in Excel — dezelfde syntaxis en argumenten.
HEX2DEC(number)The HEX2DEC function takes a hexadecimal string and converts it into its equivalent decimal integer. The number argument cannot contain more than 10 characters, and the most significant bit is the sign bit, representing negative numbers using two's complement notation.
=HEX2DEC("A5")Resultaat: 165
Converts the hexadecimal value A5 to its decimal equivalent 165.
=HEX2DEC("FFFFFFFFFF")Resultaat: -1
Converts the 10-character hexadecimal string representing -1 in two's complement.
The function supports hexadecimal numbers up to 10 characters long, ranging from FFE0000000 to 1FFFFFFFFF.
This error occurs if the input number is invalid, exceeds the 10-character limit, or is outside the supported range.