View Single Post
  #1   Report Post  
Old April 13th 16, 12:12 AM posted to microsoft.public.excel.worksheet.functions
[email protected] is offline
external usenet poster
First recorded activity by ExcelBanter: Apr 2016
Posts: 1
Default How do I sort IP addresses is ascending numerical order?

Amplifying Dana DeLouis' solution...The following method works great. You need 6 columns, but can sort on only one.

Let's say A2 contains the IPv4 address in normal non-zero-filled format like "". In B2 enter the formula:

which puts the four numeric address terms in columns B2, C2, D2 and E2. Then in F2 enter

For example, IP generates an "IP sort" number 824644734762.

Copy the two formulas down their respective columns, call column E "IPsort" or some such and sort ascending on just this column.