Hi,
I'm trying to sort a list but it does not sort correctly or same as Excel does. Any idea on how to sort same as Excel does?
Example of data in the list sorted by Sort, varname
94-996
95-305
B256-13508
B455-32438
13-041
13-044
13-061
13-15
Example of data in the list sorted by Excel
13-041
13-044
13-061
13-15
94-996
95-305
B256-13508
B455-32438
Sort function same as Excel?
- flyingDman
- Posts: 2832
- Joined: 29 Sep 2013, 19:01
Re: Sort function same as Excel?
I am not sure that your first set is the result of a simple sort, varname. Post your script.
14.3 & 1.3.7
Re: Sort function same as Excel?
Code: Select all
items := "94-996,95-305,B256-13508,B455-32438,13-041,13-044,13-061,13-15"
Sort items, D,
MsgBox, 64, Sorted items, These are your sorted items:`n`n%items%
Re: Sort function same as Excel?
Code: Select all
fileread, Missing, Missing.txt
sort, Missing, D,
filedelete, Missing.txt
Fileappend,
(
%Missing%
),Missing.txt
Re: Sort function same as Excel?
Your Sort command says to make the delimiter a comma. Your list is not separated by commas. Change it to use the default delimiters (line breaks) like this:
Demo:
Code: Select all
Sort, Missing
Code: Select all
Missing =
(
94-996
95-305
B256-13508
B455-32438
13-041
13-044
13-061
13-15
)
Sort, Missing
MsgBox, % Missing
- flyingDman
- Posts: 2832
- Joined: 29 Sep 2013, 19:01