Home |
Search |
Today's Posts |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Looking for a formula that will convert IP address for sorting
On Jan 6, 10:54*am, I wrote:
use the following macro (making sure the range in B is still selected): On second-thought, I think this is easier to use as a function. Enter the function below according to the instructions in my previous posting. Then, if A1 contains the IP address in dot-notation, put the following into B1: =convertIP(A1) The function is: Function convertIP(c) As String ip = Split(c, ".", 4) For i = 0 To 3 Select Case Len(ip(i)) Case 1: ip(i) = "00" & ip(i) Case 2: ip(i) = "0" & ip(i) Case Else End Select Next i convertIP = Join(ip, ".") End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Function to convert to email address? | Excel Worksheet Functions | |||
Convert Relative to absolute address | Excel Discussion (Misc queries) | |||
how can i convert an email address to a web address | Excel Worksheet Functions | |||
Sorting IP Address | Excel Discussion (Misc queries) | |||
Sorting an Address List | Excel Worksheet Functions |