Here is a UDF (user defined function) that should work.
To enter this, <alt><F11> opens the VB Editor.
Ensure your project is highlighted in the Project Explorer window, then
Insert/Module.
Paste the code below into the window that opens.
To use this, you can enter a formula of the form
=IP2HEX(A1) where A1 contains your IP address in standard format (i.e.
something between 0.0.0.0 and 255.255.255.255)
=====================================
Function IP2Hex(IPadr As String) As String
Dim IP
Dim j As Integer
IP = Split(IPadr, ".")
For j = 0 To 3
IP2Hex = IP2Hex & Right("0" & Hex(IP(j)), 2)
Next j
End Function
========================================
--ron
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.