+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 : Hexadecimal to Binary conversions

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    Los angeles, Ca
    MS-Off Ver
    Excel 2007
    Posts
    8

    Hexadecimal to Binary conversions

    I want to be able to input HEX for example on Cell A1 FF and have it converted to binary in eight different cells D1,E1,F1,G1,H1,I1,J1,K1 FOR BITS 7,6,5,4,3,2,1,0 CAN THIS BE DONE?

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,291

    Re: Hexidecimal to Binary conversions

    Hi dfoster and welcome to the forum.

    Excel has a function called Hex2Bin that should do your problem.
    http://office.microsoft.com/en-us/ex...005209110.aspx or
    http://www.excelfunctions.net/Excel-...-Function.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-07-2012
    Location
    Los angeles, Ca
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Hexidecimal to Binary conversions

    Quote Originally Posted by MarvinP View Post
    Hi dfoster and welcome to the forum.

    Excel has a function called Hex2Bin that should do your problem.
    http://office.microsoft.com/en-us/ex...005209110.aspx or
    http://www.excelfunctions.net/Excel-...-Function.html
    Yes that works no problem but it puts the binary into one cell I want the binary to go to eight different cells.

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Hexidecimal to Binary conversions

    In D1 put the formula:

    =MID(TEXT(HEX2BIN($A1),"00000000"),COLUMN()-3,1)

    And copy it across to K1.

  5. #5
    Registered User
    Join Date
    02-07-2012
    Location
    Los angeles, Ca
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Hexidecimal to Binary conversions

    That did the trick Thank You!!!

  6. #6
    Registered User
    Join Date
    02-07-2012
    Location
    Los angeles, Ca
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Hexadecimal to Binary conversions

    What if I wanted the Binary in 8 cells K10,k12,k14,k16,i10,i12,i14,i16 b7-b0 or
    j10,j12,j14,j16,e10,e12,e14,16 b7-bo?

  7. #7
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Hexadecimal to Binary conversions

    In my formula the bit in bold is determining which digit appears in which cell...

    =MID(TEXT(HEX2BIN($A1),"00000000"),COLUMN()-3,1)

    So it would be a case of playing with that, so for the first cell in your range has a value in there that resolves to 1, the 2nd has a value that resolves to 2, etc.

    To place in columns 10, 12, 14... you'd want something like:

    =MID(TEXT(HEX2BIN($A1),"00000000"),(COLUMN()-8)/2,1)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1