How can I use the Excel lookup function to find the maximum date associated with a specific value?

The Excel lookup function is a useful tool for finding specific data within a larger dataset. One of its applications is to find the maximum date associated with a specific value. This can be achieved by using the lookup function to search for the desired value, and then using the MAX function to determine the maximum date in the corresponding column. The result will be the latest date associated with the specified value, allowing for efficient data analysis and decision making. This function is particularly useful for managing large amounts of data and can save time and effort in manual searching and calculations.

Excel: Lookup Value and Find Max Date


You can use the following formula in Excel to lookup a specific value and then return the max date (i.e. most recent date) associated with the value: 

=MAX(IF(A2:A13=F1, C2:C13))

This particular formula finds the max date in the range C2:C13 where the value in the range A2:A13 is equal to the value in cell F1.

The following example shows how to use this formula in practice.

Example: Lookup Value and Find Max Date in Excel

Suppose we have the following dataset in Excel that contains information about when basketball players joined specific teams:

Suppose we would like to look up the value “Mavs” in the Team column and then return the max date associated with this team.

We can specify the Mavericks team name in cell F1 and then type the following formula into cell F2 to find the max date:

=MAX(IF(A2:A13=F1, C2:C13))

The following screenshot shows how to use this formula in practice:

By default, Excel displays the date in a numeric format.

To convert this to a recognizable date format, select cell F2 and then click the Number Format dropdown menu on the Home tab and then click Short Date:

The date will now be formatted as 4/13/2009, which represents the earliest date in the Join Date column where the value in the corresponding cell of the Team column is equal to Mavs:

Excel lookup value and find max date

For example, suppose we change the team name to Rockets:

The formula now returns 6/5/2017, which is the max date (i.e. most recent date) associated with the Rockets.

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

x