How to Calculate Daily Changes from Date and Time Values in Excel
Question details
The user needs to find the daily difference between the maximum and minimum measurement values recorded on specific dates that include time stamps.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Analyzing daily fluctuations in datasets that are continuously updated with timestamps, requiring automatic inclusion of newly added entries.
- Observed behavior
- The goal is to accurately isolate data for a specific day from timestamped entries and calculate the spread between the highest and lowest values.
Ensure that your date and time column is formatted correctly as Excel date/time serial numbers, rather than plain text, so the mathematical formulas can evaluate them properly.
Use MAXIFS and MINIFS to Calculate Daily Differences
This is the most dynamic way to calculate the exact difference between the highest and lowest measurements for a specific date using conditional functions.
This formula isolates measurements that fall precisely within the 24-hour window of your target date. Because it references entire columns, any new data added later for that date will be automatically included in the calculation.
Ensure your date and time values are located in Column A, and the corresponding measurements are located in Column B.
Enter the specific date you want to analyze in cell D2 (for example, type '10/25/2023'). Ensure this cell only contains the date, not the time.
Select the cell where you want the daily change result to appear, and input the following formula: =MAXIFS(B:B,A:A,">="&D2,A:A,"<"&D2+1)-MINIFS(B:B,A:A,">="&D2,A:A,"<"&D2+1)
Press Enter. The formula calculates the highest measurement for the day and subtracts the lowest measurement for the day, yielding the total daily change.

Summarize Daily Changes Using a Helper Column and PivotTable
Ideal for generating a comprehensive, aggregated report of daily changes across multiple dates in a large dataset.
Calculate Complex Daily Changes Effortlessly in WPS Office
WPS Spreadsheet fully supports advanced functions like MAXIFS and MINIFS, allowing you to seamlessly calculate daily changes from timestamped data. It provides an identical formula syntax to Excel, ensuring your spreadsheets work perfectly.
- 1. Open Your Spreadsheet: Launch WPS Spreadsheet and open your existing data file.
- 2. Enter the Formula: Type the exact MAXIFS and MINIFS formula to calculate the daily changes based on your target date.
- 3. Analyze and Summarize: Use the built-in PivotTable feature under the Insert tab to quickly summarize multi-day data.

Frequently Asked Questions
Why is my formula returning 0 or a #VALUE! error?
This usually happens if your dates and times in Column A are formatted as text instead of numerical date values. Select the column, go to the Data tab, and use 'Text to Columns' to convert them to a proper date and time format.
Can I use this formula if my dates and times are in separate columns?
Yes. If your dates are in Column A and times are in Column B, you can simplify the formula to point only to the date column: =MAXIFS(C:C,A:A,D2)-MINIFS(C:C,A:A,D2), assuming your measurements are in Column C.
How do I apply this calculation to a long list of dates?
List your unique dates in a single column (e.g., D2, D3, D4). Enter the formula in E2 referencing D2, and then drag the fill handle at the bottom right of the cell downwards to automatically apply the formula to all the dates in your list.
Are MAXIFS and MINIFS available in older versions of Excel?
MAXIFS and MINIFS were introduced in Excel 2019 and Microsoft 365. For older versions like Excel 2016, you will need to use an array formula combining MAX, MIN, and IF functions, which is executed by pressing Ctrl+Shift+Enter.




