HEX2DEC depends on the input number being a string e.g. if A1 contains the string FEDC , which can be a hexadecimal number , then HEX2DEC(A1) will give 65244.
If A1 contains the number 123 , then HEX2DEC(A1) will interpret 123 as a hexadecimal number and return the value 291.