How to Align Excel Time Series with Different Intervals
Question details
The user needs to combine or align two datasets that have mismatched time intervals (e.g., 5-minute versus 15-minute intervals).

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Merging multiple datasets recorded at different frequencies for unified data analysis or reporting.
- Observed behavior
- The rows between the two datasets do not naturally match up, causing misalignment when analyzing the combined metrics.
Ensure both datasets use the exact same date and time format, as slight variations in time formatting can cause lookup functions to fail.
Standardize and Align using XLOOKUP
Create a master time column with the smallest interval and use lookup functions to pull corresponding data from both datasets.
This method is best when you want to retain the granularity of your most frequent dataset (e.g., 5-minute intervals) while simply matching the less frequent dataset (e.g., 15-minute intervals) where applicable.
In a new worksheet, create a continuous time column using the smallest interval (e.g., every 5 minutes) starting from your earliest data point.
In the adjacent column, use the formula =XLOOKUP(A2, Dataset1!A:A, Dataset1!B:B, "") to retrieve the values for the 5-minute intervals.
In the next column, use =XLOOKUP(A2, Dataset2!A:A, Dataset2!B:B, "") to retrieve the values for the 15-minute dataset. Cells corresponding to times that only exist in the 5-minute dataset will naturally remain blank.

Aggregate Smaller Intervals to Match Larger Intervals
Convert the 5-minute interval data into 15-minute intervals by averaging or summing them to match the less frequent dataset.
Reshape Data using Dynamic Array Formulas
Use dynamic array formulas like TOCOL and WRAPROWS to unpivot horizontal blocks of data and align them vertically.
Align Time Series Data Seamlessly in WPS Office
WPS Spreadsheet fully supports advanced functions like XLOOKUP, SUMIFS, and dynamic arrays, making it incredibly easy to align mismatched time series data. It offers an intuitive interface tailored for complex data processing.
- 1. Open Your Data in WPS Spreadsheet: Launch WPS Office and open your workbook containing the mismatched time series datasets.
- 2. Create a Unified Time Column: Use the AutoFill feature to quickly generate a master column of times at the desired interval.
- 3. Apply Lookup or Aggregation Functions: Navigate to the Formulas tab and insert XLOOKUP or AVERAGEIFS functions to fetch and align your data perfectly.
- 4. Save and Export: Save your newly aligned dataset in standard .xlsx format to share with colleagues or use in other analysis tools.

Frequently Asked Questions
What happens to the missing data points when aligning a 15-minute series to a 5-minute series?
When using lookup functions like XLOOKUP, intervals that exist in the 5-minute series but not in the 15-minute series will simply return empty or null values depending on your formula syntax. You can handle these by interpolating the missing values or leaving them blank.
Can I use a PivotTable to align time series with different intervals?
Yes, you can combine the datasets into a single unified table, add a column indicating the source of the data, and insert a PivotTable. From there, you can group the time field by 15-minute intervals to summarize and align the data.
Why is XLOOKUP returning a #N/A error when matching times that look identical?
Time values in spreadsheets are stored as floating-point decimals. Minor calculation or precision differences can cause exact matches to fail. You can resolve this by wrapping your time references in the ROUND function or formatting both columns as plain text before matching.




