E eluehmann Oct 4, 2004 #1 I know this is a long shot but is there anyone out there that knows ho to convert IP of the system to hexadecimal number
I know this is a long shot but is there anyone out there that knows ho to convert IP of the system to hexadecimal number
J Jay Oct 4, 2004 #2 I know this is a long shot but is there anyone out there that knows how to convert IP of the system to hexadecimal number? Click to expand... One way is to start with the four components in A1, B1, C1, and D1. (If they're in one cell, they can be split using "Data >> Text to columns.) Then, in E1, put =DEC2HEX(A1,2)&DEC2HEX(B1,2)&DEC2HEX(C1,2)&DEC2HEX(D1,2) (I'd also add some checks that the IP is valid.)
I know this is a long shot but is there anyone out there that knows how to convert IP of the system to hexadecimal number? Click to expand... One way is to start with the four components in A1, B1, C1, and D1. (If they're in one cell, they can be split using "Data >> Text to columns.) Then, in E1, put =DEC2HEX(A1,2)&DEC2HEX(B1,2)&DEC2HEX(C1,2)&DEC2HEX(D1,2) (I'd also add some checks that the IP is valid.)
R Ron Rosenfeld Oct 5, 2004 #3 I know this is a long shot but is there anyone out there that knows how to convert IP of the system to hexadecimal number? Click to expand... 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
I know this is a long shot but is there anyone out there that knows how to convert IP of the system to hexadecimal number? Click to expand... 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