Find the Highest Value for a Specific Date in Excel
Question details
Find the highest value associated with a specific date when the source dates also contain times.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet lists date-time entries at 30-minute intervals in column A and corresponding values in column B. The target date is in D2.
- Observed behavior
- Comparing complete date-time values with the target date can exclude records because their time portions differ.
Check that A2:A481 contains real Excel date-time values, B2:B481 contains numeric values, and D2 contains a date without a time. Adjust the ranges in the formulas if your data occupies different cells.
Use MAXIFS to include the entire target day
Use a start-of-day and next-day boundary to find the maximum without removing times from the source data.
Type the date you want to check in cell D2, without a time.
Select an empty result cell and enter =MAXIFS($B$2:$B$481,$A$2:$A$481,">="&D2,$A$2:$A$481,"<"&D2+1).
Press Enter. The formula includes timestamps from midnight on D2 up to, but not including, midnight on the following day.

Use an array formula to ignore the time portion
Use this method when MAXIFS is unavailable or when you prefer to compare the date portion of each timestamp.
Find a Daily Maximum in WPS Spreadsheet
Use MAXIFS in WPS Spreadsheet to calculate the highest value for a date while retaining the original timestamps.
- 1. Open the workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
- 2. Set the target date: Enter a date without a time in D2 and check that timestamps are in A2:A481 and values are in B2:B481.
- 3. Calculate the maximum: Select an empty cell and enter =MAXIFS($B$2:$B$481,$A$2:$A$481,">="&D2,$A$2:$A$481,"<"&D2+1), then press Enter.
- 4. Save the workbook: Select File > Save or Save As to keep the result in your workbook.

Frequently Asked Questions
Why doesn't an exact date match include every timestamp?
Excel stores a time as the fractional part of a date-time value. A comparison with D2 at midnight will not match the same date at 12:30 PM. Use MAXIFS with >=D2 and <D2+1 to include the whole day.
What if the target cell also contains a time?
Remove the time from D2 or replace D2 with INT(D2) in both MAXIFS criteria. The upper boundary should then be INT(D2)+1.
Why does the formula return 0?
A result of 0 may mean no dates matched, although 0 can also be a valid maximum. Check that the entries in column A are real dates and that D2 contains the intended date.
Can I use the array formula in an older version of Excel?
Yes. Enter =MAX(IF(INT($A$2:$A$481)=D2,$B$2:$B$481)) in the result cell, then press Ctrl+Shift+Enter instead of Enter.




