• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse

You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:

  • You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
  • You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
  • If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

Previously on "One for the Excel experts"

Collapse

  • Spacecadet
    replied
    Originally posted by bored View Post
    That won't work unless the only difference between the IP adresses is in the 4th part. If that's the case then it's good enough, but you might need to sort on more than 10 digits.

    Edit: looks it won't work at all

    If you only need to sort those addresses once, then the cvs file solution is probably the easiest. But if you want to make it automatic, you will most likely have to write some VBA code.
    it would work if each of the parts was padded to 3 digits. eg:
    192.168.0.1 becomes 192.168.000.001 becomes 192168000001

    easily done with:
    =RIGHT("000" & LEFT(A1,SEARCH(".", A1)-1), 3) & RIGHT("000" & MID(A1, SEARCH(".", A1)+1, SEARCH(".", A1, SEARCH(".", A1)+1)- SEARCH(".", A1)-1), 3)&RIGHT("000" & MID(A1, SEARCH(".", A1, SEARCH(".", A1)+1)+1, SEARCH(".", A1, SEARCH(".", A1, SEARCH(".", A1)+1)+1) - SEARCH(".", A1, SEARCH(".", A1)+1)-1), 3) & RIGHT("000" & MID(A1, SEARCH(".", A1, SEARCH(".", A1, SEARCH(".", A1)+1)+1)+1,3), 3)
    Last edited by Spacecadet; 28 August 2007, 14:40. Reason: Generally showing off

    Leave a comment:


  • Pondlife
    replied
    Originally posted by robnjc View Post
    you want them in date order?

    ,... pedantically yours.....
    <pedant>
    Surely you mean numerical order as opposed to lexicographic order?
    </pedant>

    Leave a comment:


  • richard-af
    replied
    Originally posted by robnjc View Post
    you want them in date order?

    ,... pedantically yours.....
    One has to second-guess the challenged User!

    Leave a comment:


  • robnjc
    replied
    Originally posted by Jog On View Post
    Any ideas how to order it differently so it lists the addresses in chronological order? I've tried changing the format of the number and there's no option for IP addresses..

    Thanks in advance
    you want them in date order?

    ,... pedantically yours.....

    Leave a comment:


  • richard-af
    replied
    Originally posted by DimPrawn View Post
    I'd use a left join.
    You are very naughty.

    Leave a comment:


  • bored
    replied
    Originally posted by Bright Spark View Post
    You need to remove the dots and pad the numeric value to 10 digits
    and convert to a number. stick this formula below in another column
    where A1 = start of IP addresses. then sort by this column.

    =VALUE(LEFT((SUBSTITUTE(A1,".",""))&REPT("0",10),1 0))
    That won't work unless the only difference between the IP adresses is in the 4th part. If that's the case then it's good enough, but you might need to sort on more than 10 digits.

    Edit: looks it won't work at all

    If you only need to sort those addresses once, then the cvs file solution is probably the easiest. But if you want to make it automatic, you will most likely have to write some VBA code.
    Last edited by bored; 24 August 2007, 17:57.

    Leave a comment:


  • DimPrawn
    replied
    I'd use a left join.

    Leave a comment:


  • Bright Spark
    replied
    You need to remove the dots and pad the numeric value to 10 digits
    and convert to a number. stick this formula below in another column
    where A1 = start of IP addresses. then sort by this column.

    =VALUE(LEFT((SUBSTITUTE(A1,".",""))&REPT("0",10),1 0))

    Leave a comment:


  • Jog On
    replied
    legend

    Leave a comment:


  • richard-af
    replied
    Copy-n-paste IPs into Notepad. Use Ctrl-H to change all dots to commas.
    Save as xxx.csv
    Open xxx.csv in Excel
    Create new column, and set it to ColA & "." & ColB & "." & ColC. Drag-n-copy down the page. Copy and Paste Special as Values.
    Delete original Cols A, B & C.
    You now have new Col A, which is a list of IPs without the last octet. That's in Col B.
    Select entire page, sort by ColA/ColB.
    In an empty Col, set it to be ColA & "." & ColB. Drag-n-copy down the page. Copy and Paste Special as Values.

    Et, voila!
    Last edited by richard-af; 24 August 2007, 18:12.

    Leave a comment:


  • Jog On
    started a topic One for the Excel experts

    One for the Excel experts

    Got a spreadsheet full of IP addresses that someone before me ordered by ascending numbers. Unfortunately instead of looking like:

    192.168.0.1
    192.168.0.2
    192.168.0.3
    192.168.0.4
    192.168.0.5
    etc etc

    It's ordered it like this:

    172.17.90.1
    172.17.90.10
    172.17.90.100
    172.17.90.101
    172.17.90.102
    172.17.90.103
    172.17.90.104
    172.17.90.105
    172.17.90.106
    172.17.90.107
    172.17.90.108
    172.17.90.109
    172.17.90.11
    172.17.90.110
    172.17.90.111
    172.17.90.112

    Any ideas how to order it differently so it lists the addresses in chronological order? I've tried changing the format of the number and there's no option for IP addresses..

    Thanks in advance
Working...
X