Power Query Problems

How to Convert Start and End Dates to Monthly Excel Columns

Aamir Naveed AkramAamir Naveed Akram Nov 10, 2026 868 views

Question details

The user needs to expand a large dataset containing start and end dates into monthly columns without generating unnecessary values outside the applicable date ranges.

How to Convert Start and End Dates to Monthly Excel Columns
Product
Excel
Device & OS
not provided
Scenario
Expanding records across applicable months based on specific start and end dates for detailed monthly analysis.
Observed behavior
The goal state is a dynamically expanded table with monthly headers and values corresponding only to the active months for each individual record.
Before you start

Ensure your dataset is formatted as an Excel Table and that your start and end date columns contain valid, recognizable date values rather than plain text.

Solution 1Recommended

Use Power Query to Unpivot and Expand Dates

Power Query is the most reliable and efficient method for expanding large datasets (over 200,000 records) into monthly columns without slowing down your workbook.

Power Query allows you to transform your data structurally. By creating a list of dates between your start and end points and expanding them, you can accurately map values to the correct months.

1
Load data into Power Query

Select your data range, navigate to the Data tab, and click 'From Table/Range' to open the Power Query Editor.

2
Unpivot the monthly data

Select your start and end date columns, right-click the headers, and choose 'Unpivot Other Columns' to flatten any existing monthly labels into rows.

3
Create a custom date list column

Go to the Add Column tab, click 'Custom Column', and write a formula using List.Dates to generate a continuous list of months between your start and end dates.

4
Expand the custom column

Click the expand icon (two diverging arrows) on your new custom column header and select 'Expand to New Rows' to duplicate the record for each applicable month.

5
Load data back to Excel

Once formatted, go to the Home tab and click 'Close & Load' to export the expanded, monthly-aligned table back into your Excel worksheet.

Use Power Query to Unpivot and Expand Dates
Best for Large Data: Using Power Query prevents the extreme resource consumption and lag often caused by complex dynamic arrays on large datasets.

Expand Data and Manage Dates with WPS Spreadsheet

WPS Spreadsheet offers powerful data processing tools, including dynamic array functions and advanced data transformation capabilities to help you manage date ranges efficiently.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your Excel workbook containing the start and end dates.
  2. 2. Apply dynamic array formulas: Use functions like SEQUENCE and EOMONTH directly in the grid to calculate the monthly span automatically.
  3. 3. Analyze and format: Use WPS Spreadsheet's conditional formatting and pivot tables to summarize and visualize your dynamically expanded monthly data.
100% compatible with Microsoft Excel formulas and functionsLightweight design for faster processing of large datasetsBuilt-in dynamic array support including sequence generationFree to download with a familiar, easy-to-use interface
microsoft office alternative - wps office

Frequently Asked Questions

Why are my newly generated date columns showing as numbers instead of months?

Excel stores dates as sequential serial numbers. To fix this, select your newly generated monthly headers or columns, right-click, choose 'Format Cells', and apply a 'Date' or 'Custom' format (such as 'mmm-yyyy').

Can I expand date ranges to monthly columns without Microsoft 365?

Yes. If you are using an older version of Excel or a free alternative like WPS Office, you can use the Power Query method to unpivot and expand the dates without relying on newer dynamic array functions.

Why is my dynamic array formula returning a #SPILL! error?

A #SPILL! error occurs when the dynamic array formula doesn't have enough empty adjacent cells to display all the generated monthly columns and rows. Locate and clear any existing data or spaces blocking the spill range.