M BUZZ CRAZE NEWS
// news

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?

4

1 Answer

The maximum valid input to HEX2BIN() is 1FF

From Excel HEX2BIN function help:

If number is negative, it cannot be less than FFFFFFFE00, and if number is positive, it cannot be greater than 1FF.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy