Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Aimran
 
Posts: n/a
Default How do I change hexadecimal number to binary in excel


  #2   Report Post  
Hernandez, Roberto
 
Posts: n/a
Default 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" escribió en el mensaje
...



  #3   Report Post  
Duke Carey
 
Posts: n/a
Default 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" escribió en el mensaje
...




  #4   Report Post  
Hernandez, Roberto
 
Posts: n/a
Default 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" escribió en el mensaje
...
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" escribió en el mensaje
...






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the color of all series in an excel chart in one go. Marielle Charts and Charting in Excel 2 May 3rd 23 07:45 PM
How do I change the default number format in excel? chipster Excel Worksheet Functions 1 May 9th 05 10:14 PM
Excel random number JJ Excel Discussion (Misc queries) 2 May 4th 05 01:19 PM
Excel 2003 random number generator JJ Excel Discussion (Misc queries) 1 May 4th 05 01:02 PM
How to change the color of all series in an excel chart in one go. Mz2 Charts and Charting in Excel 1 January 20th 05 01:07 AM


All times are GMT +1. The time now is 10:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"