• 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!

One for the Excel experts

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    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
    Coffee's for closers

    Comment

    Working...
    X