View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Chipmunk Chipmunk is offline
external usenet poster
 
Posts: 7
Default Convert Binary to Hex

Michel,
I sincerly appreciate all your help. But....I'm must be green here. I'm
not getting what your saying to do 100 percent. Can explain so that I might
better understand.

Thanks,
Benny

"Michel Pierron" wrote:

Hi Chipmunk,
This code must be in a standard module.
In worksheet cell:
=
In ComboBox Functions: select Other functions
In ComboBox Categories: Select Personalized
In ListBox Functions: Select BinToHex

Regards,
MP

"Chipmunk" a écrit dans le message de
news: ...
Thanks for the response. I opened up the vb editor and pasted in your
code.
What do I need to put in the worksheet cell?

Thanks.

"Michel Pierron" wrote:

Hi Chipmunk,

Function BinToHex(Binary As String)
Dim Value&, i&, Base#: Base = 1
For i = Len(Binary) To 1 Step -1
Value = Value + IIf(Mid(Binary, i, 1) = "1", Base, 0)
Base = Base * 2
Next i
BinToHex = Hex(Value)
End Function

MP

"Chipmunk" a écrit dans le message
de
news:
...
How to I convert a 32 bit binary number to hex?