Why do I get HEX2BIN() error for long (but valid) strings?
By Emma Martinez •
In Excel 2010, the formula =hex2bin("111",10) gives the right answer of 0100010001. According to the function help, the arguments should be at most 40 bits (10 hex digits). However, the following versions give me a #NUM! error:
=hex2bin("200",10)
=hex2bin("100",11)i get similar (mis)behaviour when using the bin2hex() function.
What am I doing wrong?
41 Answer
The maximum valid input to HEX2BIN() is 1FF
From Excel HEX2BIN function help:
4If number is negative, it cannot be less than FFFFFFFE00, and if number is positive, it cannot be greater than 1FF.