+ Reply to Thread
Results 1 to 12 of 12

Excel 2007 : Hex to Binary using a divide and conquer approach for the first and second digit

  1. #1
    Registered User
    Join Date
    07-16-2012
    Location
    montreal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Hex to Binary using a divide and conquer approach for the first and second digit

    I am trying to find a formula that convert Hex to Binary. I have already found one but now I am required to use a divide and conquer approach for the first and second digit.
    example:
    Input Hex B7 (B= 1st digit 7= 2nd digit)
    Binary 10110111
    someone suggest me to consider Right and Left functions to extract the digits from the input and “&” for concatenating strings… any formula suggestions?

    Thanks

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    say in A1 is B7

    =IF(COLUMN(A$1)>LEN($A1),"",MID($A1,COLUMN(A1),1))
    drag to the right

    learned this from martin.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Registered User
    Join Date
    07-16-2012
    Location
    montreal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    i tried it and it did not work

  4. #4
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    this will just get the first and second digit... paste the code above in cell B1 then drag to column C

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    another way
    get letters
    Please Login or Register  to view this content.
    get numbers

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-16-2012
    Location
    montreal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    I see... yes it works separating the 2 digits... thanks... now i am in the dilemma to find how i use this formula to convert hex to binary and reversal. Do you think you can help.

  7. #7
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    yes

    how about the functions

    A1 is hex B7
    =hex2bin(A1)
    or
    A2 is binary number

    =bin2hex(A2)
    do we require long method as in compute..? or this functions could do...

  8. #8
    Registered User
    Join Date
    07-16-2012
    Location
    montreal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    thank you so much for your help...
    I guess this will work... I will continue with the other formulas..

  9. #9
    Registered User
    Join Date
    07-16-2012
    Location
    montreal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    One last question.. is there any option to drag down a column of hex number? so far no luck trying to fine one

  10. #10
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    i think you can not drag hex numbers to fill they are text..

    one work around is to use decimal numbers to fill a column then convert these numbers to hex with dec2hex function, then you can copy paste them.

  11. #11
    Registered User
    Join Date
    07-16-2012
    Location
    montreal
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    thank you I have already done that option... you have been very helpful...

  12. #12
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Hex to Binary using a divide and conquer approach for the first and second digit

    your welcome. thanks.

+ 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