Converts a binary number to a hexadecimal number.
ฟังก์ชันนี้ทำงานใน Google Sheets เหมือนกับใน Excel — ไวยากรณ์และอาร์กิวเมนต์เดียวกัน
BIN2HEX(number, [places])The BIN2HEX function converts a binary string into its hexadecimal equivalent. If the number is negative, the function returns a 10-character hexadecimal number using two's complement notation.
=BIN2HEX("11111011")ผลลัพธ์: FB
Converts the binary value 11111011 to its hexadecimal equivalent FB.
=BIN2HEX("101", 4)ผลลัพธ์: 0005
Converts 101 to hexadecimal and pads the result to 4 characters.
The function can handle binary numbers up to 10 bits (for positive numbers) or 10 characters (for negative numbers).