· Operations
Combine supplier cost files in Excel without losing the source
A folder import stacks supplier rows; a merge connects those rows to another table. Set up each operation separately, with source references you can trace.
Use a folder import to bring consistent supplier files into one table. If those costs also need to connect to jobs or purchase-order lines, treat that match as a separate step. Combining files does not by itself establish which job a charge belongs to.
Prepare the folder and sample file
Microsoft’s folder-import guide requires the files to share a schema: consistent headers, data types and number of columns. Column order can differ because matching is by column name. It also warns that unrelated files in the folder, including selected subfolders, can be included in the import. These conditions define what belongs in this workflow: compatible tables, not an arbitrary collection of invoice PDFs and workbooks. [1]
Keep the supplier originals unchanged. Put prepared copies in a dedicated import folder and standardise equivalent headings there, such as Invoice No and Supplier Code. Do this once for each input format. Keep a source filename or another clear document reference in the resulting records so a colleague can get back to the original cost line.
In Excel, select Data > Get Data > From File > From Folder and check the file list. Microsoft documents Combine & Load for combining and loading the result, and Combine and Transform Data when you need the Power Query Editor first. For Excel or Access sources with several objects, its sample-file dialog allows no object or one selected object, not several. Check which sheet, table or range the sample is using before proceeding. [1]
For supplier costs, inspect that choice rather than accepting whichever file happens to be first. Use the object containing the actual cost rows, not a cover sheet or subtotal-only report. Compare the imported rows with a source file before bringing the rest of the folder into your costing work.
Protect references before matching
Microsoft documents automatic type detection for Excel, CSV and text sources. The default detection adds a Changed type step after inspecting the first 200 rows. It also defines Text as a string type that can hold numbers as text. Those details matter for identifiers: inspect the type-conversion step instead of treating a supplier reference as a quantity just because its first values contain digits. [3]
For a hypothetical example, suppose the supplier’s invoice reference is 0071 while the costing file contains 71. Check the original before changing either record. If a numeric conversion removed the zeros, correct the import from the original reference as text. Changing a value that is already 71 to text is not evidence that its missing prefix was 00; do not invent a fixed width unless the supplier’s numbering rule supports it.
Agree what identifies a cost line. An invoice number alone may be insufficient when an invoice covers several jobs or repeats the same product. Use the supplier and invoice reference with a line reference, or maintain a reviewed mapping to the relevant job. Leave an uncertain allocation open for a person to resolve rather than attaching a plausible job automatically.
Merge against the job records, then inspect exceptions
Power Query’s merge documentation draws a useful distinction from folder combination. A merge joins two tables using selected column values; the selected columns do not need identical names, but they need the same data type. For a multi-column match, select the columns in the same order in both tables. The dialog displays an estimated match count before the result is expanded. [2]
Use that distinction when connecting supplier rows to your job table. Choose the actual reference columns on both sides and compare their types. Treat the match count as something to investigate: pick an unmatched line, find its original reference and check whether the job mapping exists. Do not rename headings repeatedly when the problem is the values used for the match.
Microsoft describes a left outer join as retaining all rows from the left table with matching rows from the right. An inner join retains only matching rows. For a review of supplier costs, consider the supplier table on the left with a left outer join so unmatched cost rows remain available to inspect. That is a review choice, not a rule for every reconciliation. [2]
Before using the combined figures, compare the row count with the prepared source files, inspect repeated references and check a cost against its document and line. Keep unmatched records visible in a separate review view or with a clear status. The useful output is a traceable cost table with its exceptions still present, not just a refreshed total.
Sources
[1] Import data from a folder with multiple files (Power Query)
