Author: Oscar Cronquist Article last updated on May 11, 2022

The DEC2HEX function converts a decimal number to a hexadecimal number.

Formula in cell D3:

=DEC2HEX(B3,C3)

Excel Function Syntax

DEC2HEX(number, [places])

Arguments

number Required. The decimal integer you want to convert.
[places] Optional. The number of characters to use. If not entered the function uses the number of characters needed to complete the task. This argument allows you to add leading 0s (zeros).

Comments

The hexadecimal numeral system has a base of 16, 0-9 represents zero to nine and A,B,C,D,E and F represent values ten to fifteen.

For example, binary values ranging from 00000000 to 11111111 is represented as 00 to FF in hexadecimal which makes it easier to read.