A list of car brands alone does not give you any indication on popularity. 😉
- Is there a second column with sales figures?
- Does your list contains multiple occurences of each brand and you want to look for the most frequent?
Both problems are easy to solve. You probably want case #1.
Create a 2D array of strings (table) of all your data. slice out the desired column to sort by, convert it to numeric (You don't want to sort numbers aphabetically ;)), and use it to set the sort key(see below). Using the key, generate a sorted table in a loop.
To obtain the sort key, it is useful to know that arrays of clusters are sorted primarily by cluster element 0. This makes it easy to generate the sort key as follows.

Most likely, you can generate your sorted table in the second loop directly. If you get stuck, attach your code. Good luck. 🙂
Message Edited by altenbach on 02-10-2007 09:06 AM