← All tools

Compare two CSV files by ID without treating reordered rows as changes

Match order exports to payment records, interpret missing and changed rows, and check duplicate keys before using a reconciliation report.

Try this in FileMinto

  1. Choose Try sample to load the order and payment examples, or choose your two exports. Inspect each input preview before comparing.
  2. Check the proposed match columns. Map the identifier on each side, then review which non-key columns will be compared.
  3. Compare files, inspect Changed and both Only in categories, then download the report. Resolve Needs review before treating the result as complete.

Check the result. The sample should give one changed pair, one unchanged pair, one record only in A and one only in B. Reordering records should not alter those counts.

Open Compare two CSV files

Choose what one record means

An order number can identify an order, but it may not identify an individual item. If an order contains three products, matching all three rows by order number alone creates an ambiguous group. Use an order number plus line number when both exports contain that information. FileMinto supports up to three key columns. A customer name is usually a poor substitute: two customers can share a name, and one customer can appear with different spelling. Decide the unit of comparison before interpreting missing records.

Work through the built-in example

File A contains orders 00123, 00124 and 00125. File B contains references 00125, 00123 and 00126, in that order. Match Order ID to Reference, Amount to Gross, and Status to Status. Order 00123 changes from 19.90 to 20.90; 00125 stays at 10.00 with Pending status. Order 00124 appears only in A, while 00126 appears only in B. The changed row is not the first row on each side. Its identifier establishes the pair.

Different column names do not mean different data

A bank export might call an identifier Reference while an order system calls it Order ID. Pair those columns explicitly. Conversely, two columns both named Amount might represent different things: one may include fees, shipping or tax. Inspect a known transaction before accepting a same-name suggestion. Leave irrelevant export timestamps out of the comparison if they change every time the report runs. Keep a note of those exclusions alongside the report so another reviewer knows what was actually checked.

Text differences need interpretation

Identifiers remain text, so 00123 and 123 are different keys. Likewise, numeric-looking cells such as 19.90 and 19.9 can differ as text even though a person reads the same amount. Currency symbols, spaces and capitalization can also matter. Do not remove leading zeros from every column just to reduce the differences. If a deliberate cleaning step is needed, make copies with CSV Converter, verify a few identifiers, and compare those copies while retaining the originals.

Needs review is not a missing payment

Blank identifiers and repeated keys cannot establish a reliable one-to-one pair. They belong in Needs review rather than being silently matched to the first row found. Check whether a composite key solves the repetition or whether the source export itself contains duplicates. An Only in A record means the chosen key was not paired in B; it does not establish that a payment failed. Different date ranges, settlement delays and filters in the exporting applications can explain the absence.

Make a large report usable

For a wide export, check the comparison-column summary before starting. If long fields have been left out, the result does not cover those fields. Begin with the columns relevant to your question, such as amount and status, then run a separate comparison when narrative fields matter. The visible table is a page of the result, not the entire report. Use category downloads to send a reviewer just the records they need, and retain the complete report when recording the scope of the check.

Verify the report against both sources

Pick one example from Changed and each Only in category, then locate it in the original exports by key. Confirm that the report shows the expected source values and that the selected date periods overlap. For a bank source still in OFX format, convert the statement first and keep its transaction identifiers. Comparison identifies records to investigate; resolving a discrepancy still requires the original records and the meaning of their fields.

Under the hood

Rows are paired using selected key fields rather than their position in the file.

What to look for
Format or symptomWhat it meansWhat to check
Almost everything is missingThe chosen keys may describe different identifiersFind one known shared record in both previews
Repeated keys need reviewOne key identifies several recordsAdd a line identifier or inspect duplicate source rows
Amounts look identical but differThe cell strings have different formattingInspect decimals, symbols and whitespace before cleaning

Step-by-step troubleshooting checklist

  1. Confirm the matching unit and compared columns.
  2. Check one record from each nonempty category against the sources.
  3. Keep source files and the report together with the export date ranges.