Calculation Issues

Find the Highest Value for a Specific Date in Excel

Anum MushtaqAnum Mushtaq Nov 18, 2026 870 views

Question details

Find the highest value associated with a specific date when the source dates also contain times.

Find the Highest Value for a Specific Date in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Enter the target date

Type the date you want to check in cell D2, without a time.

2
Enter the formula

Select an empty result cell and enter =MAXIFS($B$2:$B$481,$A$2:$A$481,">="&D2,$A$2:$A$481,"<"&D2+1).

3
Calculate the maximum

Press Enter. The formula includes timestamps from midnight on D2 up to, but not including, midnight on the following day.

Use MAXIFS to include the entire target day
Check for matching records: MAXIFS returns 0 when no cells meet the criteria, so check the source dates if 0 is unexpected.
Calculate daily maximums in WPS

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. 1. Open the workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
  2. 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. 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. 4. Save the workbook: Select File > Save or Save As to keep the result in your workbook.
Include all times on the target date with a single formulaOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interfaceWork with spreadsheets using the free WPS Office suite
microsoft office alternative - wps office

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.