# How to convert hex to binary?

I would like to get some help with my assignment. I have to convert hex to binary by using hlookup or conditional formatting in Excel.

How should I approach this?

-
What have you tried? –  Justin Pearce Jun 14 '13 at 20:09
What you are asking is confusing... If you just asked for converting HEX to BIN, I'd tell you to use the built-in functions in excel to do that but I can't see where hlookup or conditional formatting comes in. hlookup might be to match characters for the conversion (which I can't see) but conditional formatting!? I'm not aware that conditional formatting changes the values of a cell. –  Jerry Jun 14 '13 at 20:14
Same here, the built-in functions do what you're asking but have nothing to do with hlookup.office.microsoft.com/en-us/excel-help/… –  Paul Jun 14 '13 at 20:51

This can be done using Excel's HEX2BIN function. It can be found Here. Excel is a very powerful tool that can do many other things for you.

-
My teacher ask us to use conditional formatting or hlookup only. Yes I want to convert HEX to BIN. thank you –  dalia67 Jun 14 '13 at 20:20
@dalia67: Did your teacher also say anything about asking people on the internet for the solution to the problem? –  Oliver Salzburg Jun 15 '13 at 12:11

From the Excel Help article Convert numbers to different number systems (specifically, the section Convert a hexadecimal number to binary):

To do this task, use the `HEX2BIN` function.

``````=HEX2BIN("F", 8)          Converts hexadecimal F to binary, with 8 characters (00001111)
=HEX2BIN("B7")            Converts hexadecimal B7 to binary (10110111)
=HEX2BIN("FFFFFFFFFF")    Converts hexadecimal FFFFFFFFFF to binary (1111111111)
``````
-

This is NOT a complete answer because I gather you are supposed to be learning rather than just copying, but if you know what the possible hex values are (ie not just 0-9) and you know how to represent these in binary (ie `\x2` is equivalent to `bin 10`) then since you have a one-to-one relationship you could create a table of equivalents and use that to 'covert' one version to the other.

-