Written by Allen Wyatt (last updated January 1, 2022)
This tip applies to Excel 97, 2000, 2002, and 2003
Michael has some data in two columns of a worksheet. Column A is a series of dates and column B contains expenditures for each of those dates. He needs a way to determine the date on which the minimum expenditure occurred and a way to find the date on which the maximum expenditure occurred.
At first glance you might be tempted to think you could use VLOOKUP to figure out the desired date. Unfortunately, that won't work because VLOOKUP keys off of whatever data is in the first column of your data table. Since you want to key off of the amount (looking for the minimum and maximum), you would need to switch the position of the columns, so that column A contained the amount and column B contained the dates. If you do that, you could then use the following formulas to find the dates for the minimum and maximum expenditures, respectively:
=VLOOKUP(MIN(A:A),A:B,2,0) =VLOOKUP(MAX(A:A),A:B,2,0)
If you cannot change the data columns, then you'll need to forego VLOOKUP and use a different approach, instead. The following two formulas will work with the data as originally specified by Michael:
=INDEX(A:A,MATCH(MIN(B:B),B:B,0)) =INDEX(A:A,MATCH(MAX(B:B),B:B,0))
It is important to note that if there are duplicates of the maximum and/or minimum expenditures, these formulas will only find the dates of the first occurrences. If this is not expected to happen often, a formula such as this could be used to alert the user to the existence of duplicates:
=IF(COUNTIF(B:B, MAX(B:B))>1, "Multiple Maximums ", INDEX(A:A, MATCH(MAX(B:B), B:B, 0)))
To make this formula work for minimums, just replace the two instances of MAX with MIN and change the word "Maximums" to "Minimums."
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9661) 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: Finding the Dates for Minimums and Maximums.
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!
Those in Europe use a date format that is different than those in the US; this is not news. But what if you need to ...
Discover MoreWant to push a date to some pre-defined day of the month? Here's some ways to force the issue.
Discover MoreCalculating an age is a common task when working with dates. If you want to figure out the number of years and months ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2022-01-01 16:47:29
Henry Noble
Why not simply sort the two columns based on the values in the expenditures column?
Multiple highs and lows will be readily apparent.
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments