+ Reply to Thread
Results 1 to 4 of 4

How do I change hexadecimal number to binary in excel

  1. #1
    Aimran
    Guest

    How do I change hexadecimal number to binary in excel



  2. #2
    Hernandez, Roberto
    Guest

    Re: How do I change hexadecimal number to binary in excel

    If you want to do it digit by digit you could do something like this

    In a 'normal' module:

    '***********************************************
    Function hextobin(byval hexa as string)

    Select Case hexa

    Case "0": hextobin = "0000"
    Case "1": hextobin = "0001"
    Case "2": hextobin = "0010"
    Case "3": hextobin = "0011"
    'continue until last hexa digit....
    '
    '
    case "F": hextobin = "1111"
    End Select

    End function

    '***********************************************
    "Aimran" <[email protected]> escribió en el mensaje
    news:[email protected]...
    >




  3. #3
    Duke Carey
    Guest

    Re: How do I change hexadecimal number to binary in excel

    Rather than rolling your own, use Excel's HEX2BIN() function. You must have
    the Analysis Toolpak add-in checked to make this available


    "Hernandez, Roberto" wrote:

    > If you want to do it digit by digit you could do something like this
    >
    > In a 'normal' module:
    >
    > '***********************************************
    > Function hextobin(byval hexa as string)
    >
    > Select Case hexa
    >
    > Case "0": hextobin = "0000"
    > Case "1": hextobin = "0001"
    > Case "2": hextobin = "0010"
    > Case "3": hextobin = "0011"
    > 'continue until last hexa digit....
    > '
    > '
    > case "F": hextobin = "1111"
    > End Select
    >
    > End function
    >
    > '***********************************************
    > "Aimran" <[email protected]> escribió en el mensaje
    > news:[email protected]...
    > >

    >
    >
    >


  4. #4
    Hernandez, Roberto
    Guest

    Re: How do I change hexadecimal number to binary in excel

    Thanks Duke!
    I know the Hex2bin function...
    I was actually trying to 'spread' some example to use the powerful VBA
    capabilities.


    "Duke Carey" <[email protected]> escribió en el mensaje
    news:[email protected]...
    > Rather than rolling your own, use Excel's HEX2BIN() function. You must
    > have
    > the Analysis Toolpak add-in checked to make this available
    >
    >
    > "Hernandez, Roberto" wrote:
    >
    >> If you want to do it digit by digit you could do something like this
    >>
    >> In a 'normal' module:
    >>
    >> '***********************************************
    >> Function hextobin(byval hexa as string)
    >>
    >> Select Case hexa
    >>
    >> Case "0": hextobin = "0000"
    >> Case "1": hextobin = "0001"
    >> Case "2": hextobin = "0010"
    >> Case "3": hextobin = "0011"
    >> 'continue until last hexa digit....
    >> '
    >> '
    >> case "F": hextobin = "1111"
    >> End Select
    >>
    >> End function
    >>
    >> '***********************************************
    >> "Aimran" <[email protected]> escribió en el mensaje
    >> news:[email protected]...
    >> >

    >>
    >>
    >>




+ 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