Monday morning, production meeting. The planner says order 4521 is ready to start tomorrow. The warehouse says the ERP shows it is not even released. Both are holding a printout, both are sure, and the first twenty minutes of the meeting go into finding out whose number is right. If that scene sounds familiar, this tutorial is for you.
I am Faramarz Ahmadi, and in my 24 years in manufacturing and data I have seen the same pattern in almost every plant: the ERP is the official truth, but the plan that people actually follow lives in an Excel sheet on the planner's laptop. I don't think the side sheet is the enemy. It usually exists for a good reason. The problem is that nobody checks, every week, where the two have drifted apart. This is a free, hands-on guide to doing exactly that with Power Query, which is already inside your Excel. The meeting scene is a composite of situations I see often; the numbers are illustrative.

If you want the bigger picture of why side spreadsheets multiply, I wrote about moving from spreadsheet chaos to a live operations dashboard. This article is the practical first step you can take this week.
Step 1: Get the two lists side by side
You need two files, nothing more:
- The ERP export of open production orders: order number, material, order quantity, planned start or due date, and status.
- The planner's sheet, exactly as the planner uses it. Don't ask them to clean it first. You want to see the real thing.
Save the ERP export in the same folder every week with the same file name. That one habit is what makes the whole check refreshable later. In the planner's sheet, click inside the list and press Ctrl+T to turn it into a proper Excel table.
Step 2: Load both into Power Query
In a new, empty workbook go to Data > Get Data > From File > From Excel Workbook and pick the ERP export. Choose the sheet and click Transform Data, not Load. Do the same for the planner's file. You now have two queries in the Power Query Editor. Rename them something human, for example ERP and Planner.
Power Query records every click as a step on the right-hand side. That is the point: you do the cleaning once, and next Monday it repeats itself.
Step 3: Clean the key before anything else
The order number is the key that joins the two lists, and this is where most first attempts quietly fail. Typical problems:
- Number vs text. The ERP exports "000004521", the planner typed 4521. Set the order column to Text in both queries and make the leading zeros consistent on both sides.
- Hidden spaces. Select the column and use Transform > Format > Trim. One invisible space is enough to make two identical orders "different".
- One order, several rows. Planners often split an order across lines or shifts. Use Group By on the order number so each order appears once, with the quantities summed.
Also set the date columns to the Date type and remove fully blank rows. Five minutes here saves an hour of chasing false differences.
Step 4: Merge the two with a full outer join
Select the ERP query and choose Home > Merge Queries > Merge Queries as New. Pick Planner as the second table, click the order number column in both, and set the Join Kind to Full Outer (all rows from both). Expand the new column to bring in the planner's quantity and date.
A full outer join gives you every order from both sides, which immediately shows three groups:
| Group | What it means | Typical question |
|---|---|---|
| Only in the ERP | Open in the system, not in the plan | Is this order forgotten, or should it be closed? |
| Only in the planner's sheet | Planned, but not in the system as open | Was it never released, or already closed by mistake? |
| In both | Exists on both sides | Do the quantity and date agree? |
The official Microsoft documentation on merge queries and join kinds explains each join type with pictures, if you want to go deeper.
Step 5: Flag the differences with one custom column
Go to Add Column > Custom Column and write a simple rule that labels each row. A first version can be as plain as this:
if [Planner.Order] = null then "Only in ERP" else if [Order] = null then "Only in plan" else if [Qty] <> [Planner.Qty] then "Quantity differs" else if [Due] <> [Planner.Due] then "Date differs" else "OK"
Your column names will be different; the idea is the same. Then add a second column with the date difference in days, so a one-day gap and a three-week gap don't look alike. If the formula language feels new, Copilot or ChatGPT can help you write and explain a custom column, but always test it on a few orders you know by heart. I have seen AI write a perfectly tidy formula that compared the wrong two columns.
Step 6: Load, summarise, and refresh every Monday
Choose Home > Close & Load To, load the result as a table on a new sheet, and build one small PivotTable: rows are the flag, values are the count of orders. Add a slicer for work centre or product family if you have it.
Next Monday, overwrite the ERP export with the new one, update the planner's file, and press Data > Refresh All. Ten seconds later you have this week's list of differences. In the illustrative sample behind this article, out of about 300 open orders, 41 showed up with a difference: 12 only in the ERP, 7 only in the plan, the rest quantity or date gaps. The meeting stops arguing about whose printout is right and starts with those 41 lines.
What this first pass will not tell you
The check shows where the two lists disagree. It does not tell you which side is right, and that is the real question. Sometimes the planner knows something the system doesn't; sometimes the sheet is two weeks out of date. How much difference is normal, which source wins for which field, how to handle orders the planner renamed or merged, and how to shrink the side sheet over time without breaking the plan are decisions, not formulas.
FAQ
Do I need Power BI to compare an Excel sheet with ERP data?
No. Power Query is built into Excel for Microsoft 365 and recent Excel versions under the Data tab. Power BI Desktop uses the same Power Query engine, so the steps carry over if you move to a dashboard later.
Which join kind should I use to compare two lists in Power Query?
Use a full outer join. It keeps every row from both tables, so you can see orders that exist only in the ERP, only in the planner's sheet, or in both.
Why don't my order numbers match even though they look the same?
Usually one side stores them as numbers and the other as text, there are leading zeros on one side only, or there are hidden spaces. Set both columns to text, trim them, and make leading zeros consistent.
How do I update the comparison every week?
Save the new ERP export with the same name in the same folder, update the planner's file, and use Data > Refresh All. Power Query repeats every cleaning and merge step automatically.
Should we get rid of the planner's Excel sheet?
Not on day one. The sheet usually exists because the system is missing something the planner needs. First measure where the two drift apart; that tells you what to fix in the ERP before the sheet can safely shrink.
What I keep for the actual work
When I do this with a plant, the merge is the easy part. The value is in what comes after: the tolerance rules that separate noise from a real problem, the field-by-field decision on which source is the master, the handful of checks I run before a difference reaches management, and the order in which I move things from the side sheet back into the ERP so the plan never breaks during the change. That depends on your ERP, your planners and your products, so I do it with your team, on your data.
Want to know how far your plan and your ERP have drifted?
Send me a few lines about your plant, your ERP and how your planners work today. I will tell you honestly what a first reconciliation can show and where I would look first. And next Monday, when two people walk in with two different numbers, you will already have the list on the screen.
Contact me Read: weekly production plan in Excel Read: BOM and routing check in Excel
More hands-on guides: plan vs actual in Power BI, step by step and the best AI for Excel, tested on factory data.