You are here: Functions > ARRANGE()

ARRANGE()

ARRANGE() re-arranges characters or words within a string in descending order based on the host machines character set (ASCII or EBCDIC).

Use ARRANGE() to compare two strings for equality or similarities as all transpositions will be eliminated. Particularly useful for use in the DIFFERENCE(), NEAR() or SIMILAR() functions.

For more information see DIFFERENCE(), NEAR(), and SIMILAR().

Function Format

ARRANGE(string,<c>)

The ARRANGE() function re-arranges the characters within the string in descending order (based on the character set).

The optional parameter “c” enables specification of a word separator character (commonly a blank space). If this optional second parameter is present, then the whole words defined by the separator are instead sorted in descending order, rather than the individual characters.

Examples

Standard ARRANGE() results:

ARRANGE("2740426") = "7644220"

ARRANGE("Hello There ") = "rollheeeTH "

If the optional word separator parameter is used:

ARRANGE("A fool and his money are soon parted"," ")

yields

"soon parted money his fool are and A"

Note: Notice the capital A at the end of the arranged string. This is because it is capitalized, and capitalized (upper case) letters in ASCII have a lower character set number than un-capitalized (lower-case) letters.