PDA

View Full Version : OK excel Boys , here is another question


splat
10-02-2003, 08:38 PM
I am trying to sort a spreadsheet Bby one colum that has IP addresses in it

would like
172.16.1.1
172.16.1.2
.
.

172.16.1.9
172.16.1.10

etc etc


instead when I sort I get

172.16.1.1
172.16.1.10
172.16.1.100
172.16.1.101

I'm clueless on this one.

Morryjg
10-02-2003, 09:47 PM
I'm far from being the Excel guru.... The only way I could think of doing it is to bring your IP list into Excel and put each part of the IP in a seperate column. (which would be easy if you had it in a text file, you could bring it in as period delimited) Then you could do a Data | Sort and sort by column b then c then d and it should put it in correct order. I played with just sorting a single column with IP addresses in it and could not get it to work. I tried reformatting it as almost every kind of data type and it still sorted wrong.

splat
10-03-2003, 07:44 PM
I already thought of that, won't work for this app.

johnbryanpeters
10-04-2003, 07:13 AM
You could do it with a macro, or export the data to a text file, write a little VBscript or Perl to do the sorting, and import the result - awkward, I know.

Exactly what are you trying to accomplish?

splat
10-04-2003, 08:12 AM
I have a Perl Script , the will read a CSV file
in the form of:

Name, IP addr , Record type , Domain

and will create full DNS/NIS records. I want to use this to keep track of what IP/Names are used , and we want it sorted by IP addr ( the author , prfered to sort by Name )
I have everything set up so anybody can get a free IP and propogate it.

I have also Created my own Perl Script to compare the Differeence between Unix DNS and Microsoft DNS and fix them as well.
( or bright NT admin created the Active directory on our root domain! )

and Yes I have thought about using Perl to sort it.

johnbryanpeters
10-04-2003, 07:16 PM
somepin like
- convert each octet to binary
- dump the dots
- sort