SORTDOWN

Use the SORTDOWN function to sort objects in a series in descending sequence. The function returns a series containing the values from the input series in descending order.
  • When the character set of the data is ASCII, the objects are sorted in ASCII descending order.
  • For all other character sets, the objects are sorted in binary descending order.
Syntax:
SORTDOWN (series-item-expression)
Meaning:
SORTDOWN (item_series_to_sort)
Returns:
A series object

Returns the values in item_series_to_sort in descending order.

Examples

  • SORTDOWN ( Abbr:File )

    In this example, if Abbr has these ASCII values:

    ABC, GHI, DEF

    SORTDOWN returns these values as a series as:

    GHI, DEF, ABC

  • The following table displays the results of using the SORTDOWN and SORTUP functions for a typical series of ASCII text items.
    Original Input Series Result using SORTDOWN Result using SORTUP
    Clams Casino shrimps 1 Shrimp
    Grouper raw oysters 22 Shrimp
    groupers oysters A
    Shrimp lobster tails A 1 A shrimp
    shrimps lobster A1A Shrimp
    lobster groupers AA
    lobster tails clams AAAAA
    oysters aaaaa Clams Casino
    raw oysters aa Grouper
    clams a Rock Lobster
    SHRIMP Snapper SHRIMP
    1 Shrimp Snapper Shark Fin Soup
    22 Shrimp Shrimp Shrimp
    A 1 A shrimp Shark Fin Soup Snapper
    A1A Shrimp SHRIMP Snapper
    AAAAA Rock Lobster a
    aaaaa Grouper aa
    aa Clams Casino aaaaa
    AA AAAAA clams
    A AA groupers
    a A1A Shrimp lobster
    Rock Lobster A 1 A shrimp lobster tails
    Snapper A oysters
    Snapper 22 Shrimp raw oysters
    Shark Fin Soup 1 Shrimp shrimps

Related functions

  • SEARCHDOWN
  • SEARCHUP
  • SORTUP
  • UNIQUE