Domino Code Fragment

Code Name*
Sorting Lists of Numbers
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.217.8.82
Description*
This formula will sort a list of numbers with these limits: - Largest Number can be 9,999,999.99
- Largest number of elements is approximately 8000
- Decimal accuracy to 2 digits. These are the general limits. The formula will actually handle 9 numbers and 1 decimal "." per element.
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
List := @Right(@Repeat("0"; 10) + @Text(Values * 100); 10);
A := @Right(List; 1) + "@" + List;
B := @Trim(@Right(A; ".@") : @Right(A; "0@") : @Right(A; "1@") : @Right(A; "2@") : @Right(A; "3@") : @Right(A; "4@") : @Right(A; "5@") : @Right(A; "6@") : @Right(A; "7@") : @Right(A; "8@") : @Right(A; "9@"));
@Set("A"; @Middle(B; 8; 1) + "@" + B);
@Set("B"; @Trim(@Right(A; ".@") : @Right(A; "0@") : @Right(A; "1@") : @Right(A; "2@") : @Right(A; "3@") : @Right(A; "4@") : @Right(A; "5@") : @Right(A; "6@") : @Right(A; "7@") : @Right(A; "8@") : @Right(A; "9@")));
@Set("A"; @Middle(B; 7; 1) + "@" + B);
@Set("B"; @Trim(@Right(A; ".@") : @Right(A; "0@") : @Right(A; "1@") : @Right(A; "2@") : @Right(A; "3@") : @Right(A; "4@") : @Right(A; "5@") : @Right(A; "6@") : @Right(A; "7@") : @Right(A; "8@") : @Right(A; "9@")));
@Set("A"; @Middle(B; 6; 1) + "@" + B);
@Set("B"; @Trim(@Right(A; ".@") : @Right(A; "0@") : @Right(A; "1@") : @Right(A; "2@") : @Right(A; "3@") : @Right(A; "4@") : @Right(A; "5@") : @Right(A; "6@") : @Right(A; "7@") : @Right(A; "8@") : @Right(A; "9@")));
@Set("A"; @Middle(B; 5; 1) + "@" + B);
@Set("B"; @Trim(@Right(A; ".@") : @Right(A; "0@") : @Right(A; "1@") : @Right(A; "2@") : @Right(A; "3@") : @Right(A; "4@") : @Right(A; "5@") : @Right(A; "6@") : @Right(A; "7@") : @Right(A; "8@") : @Right(A; "9@")));
@Set("A"; @Middle(B; 4; 1) + "@" + B);
@Set("B"; @Trim(@Right(A; ".@") : @Right(A; "0@") : @Right(A; "1@") : @Right(A; "2@") : @Right(A; "3@") : @Right(A; "4@") : @Right(A; "5@") : @Right(A; "6@") : @Right(A; "7@") : @Right(A; "8@") : @Right(A; "9@")));
@Set("A"; @Middle(B; 3; 1) + "@" + B);
@Set("B"; @Trim(@Right(A; ".@") : @Right(A; "0@") : @Right(A; "1@") : @Right(A; "2@") : @Right(A; "3@") : @Right(A; "4@") : @Right(A; "5@") : @Right(A; "6@") : @Right(A; "7@") : @Right(A; "8@") : @Right(A; "9@")));
@Set("A"; @Middle(B; 2; 1) + "@" + B);
@Set("B"; @Trim(@Right(A; ".@") : @Right(A; "0@") : @Right(A; "1@") : @Right(A; "2@") : @Right(A; "3@") : @Right(A; "4@") : @Right(A; "5@") : @Right(A; "6@") : @Right(A; "7@") : @Right(A; "8@") : @Right(A; "9@")));
@Set("A"; @Middle(B; 1; 1) + "@" + B);
@Set("B"; @Trim(@Right(A; ".@") : @Right(A; "0@") : @Right(A; "1@") : @Right(A; "2@") : @Right(A; "3@") : @Right(A; "4@") : @Right(A; "5@") : @Right(A; "6@") : @Right(A; "7@") : @Right(A; "8@") : @Right(A; "9@")));
@Set("A"; @Left(B; 1) + "@" + B);
@Set("B"; @Trim(@Right(A; ".@") : @Right(A; "0@") : @Right(A; "1@") : @Right(A; "2@") : @Right(A; "3@") : @Right(A; "4@") : @Right(A; "5@") : @Right(A; "6@") : @Right(A; "7@") : @Right(A; "8@") : @Right(A; "9@")));
@TextToNumber(B) / 100