Numeric sort doesn't work

Help with writing and playing macros

Numeric sort doesn't work

Postby CyberMew » Wed Aug 16, 2006 10:07 am

i have some data, and either the sort doesnt have this function, or i don't know how to use it.

the data(fake) is something like this:
repeat123 adrehadrhfe
repeat3465 gtgt343rrt
repeat239 ratrrtrtr4r
repeat391 w39dfd

upon sorting, the result is as follows:
repeat123 adrehadrhfe
repeat239 ratrrtrtr4r
repeat3465 gtgt343rrt
repeat391 w39dfd

this is what i want:
repeat123 adrehadrhfe
repeat239 ratrrtrtr4r
repeat391 w39dfd
repeat3465 gtgt343rrt

i am pretty sure the program sorts them column by colum, instead as a whole(eg. repeat391).
anyone help? the options has numeric sort selected.
User avatar
CyberMew
Newbie
 
Posts: 4
Joined: Sun Jan 01, 2006 12:00 am

Re: Numeric sort doesn't work

Postby Bego » Wed Aug 16, 2006 11:06 am

Hi,

I think you need at least one space before your numbers.
If you switch to column mode and insert a blank after the repeat, it works fine. Afterwards, you can repeat this space easily again.

rds Bego
User avatar
Bego
Master
Master
 
Posts: 357
Joined: Wed Nov 24, 2004 12:00 am
Location: Germany

Re: Numeric sort doesn't work

Postby CyberMew » Wed Aug 16, 2006 11:21 am

hi, thank you for replying

i dont understand how to configure the column thing, its complicated :x

and without the 'column' thing switched on, it works BUT i dont have time to type (and delete) spaces for thousands of line..(around 2500)
User avatar
CyberMew
Newbie
 
Posts: 4
Joined: Sun Jan 01, 2006 12:00 am

Re: sort

Postby Mofi » Wed Aug 16, 2006 1:03 pm

Click on Column - Column Mode or press Alt+C to enable the column mode.

Set the cursor after the t in repeat|123 in the first line.

Click on Column - Insert/Fill Columns, enter 1 space in the dialog and press OK.

Press again Alt+C to turn off the column mode and sort your file.

The inserted column can then be removed with Alt+C followed by Column - Delete Columns with cursor set before in the right column.

However, there is no need to insert a column here. Specify only following Advanced Sort/Options:

Start Column for Key 1: 7
End Column for Key 1: -1
All other start/end columns are set to 0.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4039
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Numeric sort doesn't work

Postby Bego » Wed Aug 16, 2006 2:17 pm

Column mode rules !!!!
Personally, I go to the place at the first line where I want to start my "multiple line insert" and press alt-c.
Then I press shift and scroll down with the cursor (also shift-pageDown is possible) as far as my block-insert needs to be.
Then I just type what has to be inserted (here: a blank).
The input is placed in EACH line :-)

rds Bego
User avatar
Bego
Master
Master
 
Posts: 357
Joined: Wed Nov 24, 2004 12:00 am
Location: Germany

Re: Numeric sort doesn't work

Postby CyberMew » Wed Aug 16, 2006 2:27 pm

thanks for the replies guy, but using both methods always keep repeat 391 at the end of the line

here are my settings..

Image

and

Image

any idea what i am doing wrong?
User avatar
CyberMew
Newbie
 
Posts: 4
Joined: Sun Jan 01, 2006 12:00 am

Re: sort

Postby Mofi » Wed Aug 16, 2006 3:04 pm

Uncheck Use Locale and the numeric sort will work. Looks like a numeric sort with Use Locale is not possible.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4039
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Numeric sort doesn't work

Postby CyberMew » Thu Aug 17, 2006 3:36 am

Yea it seems to work as intended. thanks for both of your great help. hopefully this thread will help some other people

search terms: sort, arrange, sorting, arranging
User avatar
CyberMew
Newbie
 
Posts: 4
Joined: Sun Jan 01, 2006 12:00 am


Return to Macros