이 함수는 Google Sheets에서도 Excel과 동일하게 작동합니다 — 구문과 인수가 같습니다.
DEC2HEX(number, [places])The DEC2HEX function takes a decimal integer and returns its hexadecimal equivalent. If the optional places argument is provided, the function pads the result with leading zeros to the specified length.
=DEC2HEX(10)결과: A
Converts the decimal number 10 to its hexadecimal equivalent.
=DEC2HEX(10, 4)결과: 000A
Converts 10 to hexadecimal and pads it to 4 characters.
DEC2HEX uses two's complement notation for negative numbers, returning a 10-character hexadecimal string.
This occurs if the number is outside the allowed range or if the 'places' argument is too small to represent the number.