Convert HEX to RGB in Excel

You can try with the =Hex2Dec(A1) indeed, but you should split its input into 3 parts:

One for R, one for G and one for B, considering that you would always get them in a format like this ff0000.

=HEX2DEC(LEFT(B1,2))&"-"&HEX2DEC(MID(B1,3,2))&"-"&HEX2DEC(RIGHT(B1,2))

This is the result from the formula:

enter image description here


You can convert from hex to decimal using the HEX2DEC() function. For instance:

=HEX2DEC(A1)

Where cell A1 contains the string FF, this will return 255.

More details here.