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.
With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company.
Learn more about Allen...
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.
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.
Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!