Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Determining Winners, by Category.
by Allen Wyatt
(last updated August 18, 2021)
Suppose that your company sponsors a benefit car show, and you are charged with keeping track of scores and coming up with the winners. Each column in the worksheet represents a different category of car, and each row represents a different entrant in the contest. Each cell in the table contains a score for that contestant in the appropriate categories. Your job, after tracking the scores, is to calculate the top three winners in each category: first, second, and third place.
If each category will contain a unique score for each person (there are no ties), then calculating the top three scores in each category is relatively easy. Let's assume that the first three rows of the worksheet are used to show the top three winners in each category. Cell A1 contains 1 (for first place), cell A2 contains 2 (for second place), and cell A3 contains 3 (for you know which place).
The actual scoring table begins in cell A5, with column labels. Cell A5 contains the word "Names," and then cells B5:AA5 have the names of each car category. Cells A6:A100 contain the names of each contestant, and B6:AA100 contains the scores for those contestants, by category.
Enter the following formula into cell B1:
Copy the formula to the rest of the results range, B1:AA3. The formula looks at the ranking in column A (1 through 3) and then uses that to pick the first, second, and third largest values in each column. Rather than return the value, however, the value is used to pick the name of the person with that value; it is this name that is returned.
This approach, as mentioned, assumes there are no ties in the scoring table. If it is possible to have ties, then the scoring becomes much more complex and, perhaps, the best solution is to create a user-defined function in a macro. (The reason that ties make it more difficult is that the judges need to come up with a set of rules by which to break ties. These rules can vary, which means that the formulas—and user-defined functions—can vary.)
Another suggestion is to modify the way in which your scoring table is maintained. Instead of creating a large matrix (26 columns and however many contestants there are), create a small database that only has three columns: name, category, and score. You would then enter the data for each person into the database, and sort the database to get the desired winners. Simply sort first by category and then by score, and you can easily see who the top three contestants are in each category.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3041) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Determining Winners, by Category.
Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!
It is easy to use Excel functions to sum values based on criteria you establish, unless those criteria involve the ...Discover More
When compiling statistics on a collection of data points, you may want to know whether a particular value is the "highest ...Discover More
Circular references occur when a formula includes a reference to the cell in which the formula appears. Here's how you ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.