Power Query Problems

How to Combine Two Excel Tables and Sort Months in Calendar Order

Natalie TaylorNatalie Taylor Nov 2, 2026 869 views

Question details

The user needs to merge two Excel tables containing different months without common rows into a single list sorted in calendar order (January to December).

How to Combine Two Excel Tables and Sort Months in Calendar Order
Product
Excel
Device & OS
not provided
Scenario
Combining disjointed sets of monthly data from multiple tables and generating a consolidated report sorted chronologically rather than alphabetically.
Observed behavior
Using standard VLOOKUP fails to consolidate the complete list in chronological order because the tables lack common rows, and Excel sorts text-based month names alphabetically.
Before you start

Ensure both of your source tables have identical column headers. It is also highly recommended to create a separate reference table that lists the months from January to December alongside a corresponding index number (1 to 12) to facilitate chronological sorting.

Solution 1Recommended

Use Power Query to Append Tables and Sort by a Month Index

Power Query is the most robust and scalable method for combining tables and applying custom chronological sorting without writing complex formulas.

This method involves loading your tables into Power Query, appending them into one list, and merging them with a helper table that defines the chronological order of the months.

1
Load Tables into Power Query

Select each of your source tables, go to the Data tab, and click 'From Table/Range' to load them into Power Query. Repeat this for your 1-12 Month Order helper table.

2
Append the Source Queries

In the Power Query Editor, select your first table query, click 'Append Queries' on the Home tab, and select your second table to combine them into one dataset.

3
Standardize Text Formatting

Select the Month column in your appended query, right-click the header, and choose Transform > Capitalize Each Word. This ensures exact text matching when joining tables.

4
Merge with the Month Order Table

Click 'Merge Queries' on the Home tab. Select the appended table and your Month Order table, highlighting the 'Month' column in both to join them. Once merged, click the expand icon on the new column and select only the 'Index' field.

5
Sort and Load to Excel

Click the drop-down arrow on the expanded Index column and select 'Sort Ascending' to organize the months from January to December. Right-click the Index column to remove it, then click 'Close & Load' to output the combined table back to your workbook.

Use Power Query to Append Tables and Sort by a Month Index
Scalable Solution: Once set up, you can simply add new data to your source tables and click 'Refresh' in Excel to update your combined, chronologically sorted list.
Efficient Data Management

Combine and Sort Data Seamlessly in WPS Spreadsheet

WPS Spreadsheet provides powerful data consolidation tools and advanced formula support, making it incredibly easy to merge separate datasets and sort them chronologically without a steep learning curve.

  1. 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open your .xlsx file containing the separated tables.
  2. 2. Create a master date column: List your months chronologically in a new column to act as your layout guide.
  3. 3. Insert consolidation formulas: Use the intuitive formula builder to insert your nested VLOOKUP or IFERROR functions to pull data effortlessly.
  4. 4. Use Data Consolidate: Alternatively, navigate to the Data tab and use the 'Consolidate' feature for a fast, formula-free data merge.
Fully compatible with Microsoft Excel (.xlsx) files and standard spreadsheet formulas.Built-in advanced functions like VLOOKUP, XLOOKUP, and IFERROR work seamlessly.Intuitive Data consolidation features for quick merging of disjointed tables.Free, lightweight, and fast alternative to heavy data processing applications.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel sort my months alphabetically instead of chronologically?

Excel treats typed month names (like 'January', 'February') as standard text, so default sorting organizes them from A to Z. To sort chronologically, you must either format them as actual Date values or use a custom sort list or an index helper column.

Can I use XLOOKUP instead of nested VLOOKUP formulas to combine tables?

Yes, XLOOKUP greatly simplifies this process. You can use its built-in 'if_not_found' parameter to nest a second XLOOKUP directed at the second table, entirely removing the need for an external IFERROR function.

What happens if both tables contain the same month?

If you use the nested VLOOKUP method, the formula will only return the value from the first table it searches. If you need to combine or add overlapping values, you should use the SUMIFS function instead, or utilize the 'Group By' feature in Power Query.