sorting ip addresses
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: sorting ip addresses

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I need to sort ip addresses in numerical order. 131.17 should be before 131.111. What do I need to do to get these to sort correctly?
    Thanks,
    David

    xxx.xx.131.111
    xxx.xx.131.118
    xxx.xx.131.120
    xxx.xx.131.17
    xxx.xx.15.172
    xxx.xx.131.173
    xxx.xx.131.174
    xxx.xx.5.175
    xxx.xx.131.20


    [ This Message was edited by: slodave on 2002-03-14 14:04 ]

  2. #2
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If all the IP addresses start with 131 then you can get rid of it and then sort and afterwards add 131 back in.

    Hope this helps.
    Kind regards,Al.

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    On 2002-03-14 13:34, slodave wrote:
    I need to sort ip addresses in numerical order. 131.17 should be before 131.111. What do I need to do to get these to sort correctly?
    Thanks,
    David

    xxx.xx.131.111
    xxx.xx.131.118
    xxx.xx.131.120
    xxx.xx.131.17
    xxx.xx.131.172
    xxx.xx.131.173
    xxx.xx.131.174
    xxx.xx.131.175
    xxx.xx.131.20
    If your IP list begins in cell A2 enter the formula, =MID(A1,12,3)+MID(A1,8,3)*1000, into cell B2, Fill Down and sort on the column B values.

    [ This Message was edited by: Mark W. on 2002-03-14 14:06 ]

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com