Section: AI Automation

Reconciling two lists is the job AI is genuinely good at: it reads both, spots what does not match, and writes the differences out in a table you can check. This guide gives a prompt that works for an invoice list against a payments list, the output format that makes the answer usable, and the formulas that verify the result in the sheet.
The job, and where the AI belongs
You have two lists that should agree: invoices raised and payments received, orders placed and items shipped, a roster and a sign-in sheet. Somewhere in the middle there is a missing item, a wrong amount or a duplicate.
AI is useful for the reading and the comparison. It is the wrong place for the final answer, because a chat reply cannot prove it read every row. Treat the model as a fast first pass, then confirm the findings with a formula in the sheet. That split is what makes the workflow safe, and it is the same discipline as cleaning data with ChatGPT.

Set the two lists up first
Put each list in its own column block, with one row per record and no merged cells. Paste them into the prompt, or upload the file if your tool accepts one. Keep the amount as a number, not as text with a currency symbol, or the comparison will compare strings.
A small worked example makes the rest of this concrete. Invoices: INV-1001 250, INV-1002 300, INV-1003 175, INV-1004 420, INV-1005 480, INV-1006 90. The total is 1,715.
Payments: 1001 250, 1002 300, 1004 420, 1005 450, 1006 90, plus one payment of 240 with no invoice number. The total is 1,750.
Three things are wrong, and the arithmetic confirms them: invoice 1003 was never paid, which is 175 missing; invoice 1005 was paid 30 short; and 240 arrived with no reference. Check it the other way: 1,715 minus 175 minus 30 plus 240 is 1,750, which is exactly the payments total.

The prompt
OpenAI's prompt engineering guidance puts the instruction first, separates it from the data with a delimiter such as three hashes or triple quotes, and asks for a specific output format. Applied to this job, the prompt looks like this:
You are reconciling two lists. Compare list A (invoices) with list B (payments) by reference number. Report: (1) references in A with no payment in B, (2) references in B with no invoice in A, (3) references in both where the amounts differ, showing both amounts. Return a table with the columns Reference, Problem, Amount in A, Amount in B. List A: ### ... ### List B: ### ... ###
Three choices in that prompt are doing the work. The instruction comes before the data. The data sits inside delimiters. The output format is named column by column, which is the difference between a paragraph you have to interpret and a table you can paste back.

What a good answer looks like
Against the example above, the reply should list exactly three rows:
- INV-1003, no payment, 175, blank.
- INV-1005, amount differs, 480, 450.
- No reference (240), payment with no invoice, blank, 240.
If it returns two rows, or adds a fourth, do not argue with it in the chat. Check the sheet. The model may have misread a row, and the sheet is the authority.
Verify in the sheet
Two formulas catch almost everything. To find invoices with no matching payment, count the payment references: =COUNTIF(payments!A:A,A2)=0 flags the missing ones. To find payments with no invoice, run the same test in the other direction.
For a labelled answer rather than a count, XLOOKUP returns the payment amount beside each invoice, and a blank result is the missing payment. For amount differences, subtract one from the other in a helper column and filter for anything that is not zero.
The COUNTIF route is the one to trust for a final count, because it is arithmetic you can re-run and show to someone else.
Ask for the reason, not just the list
A second pass is worth one more prompt: ask the model to group the findings by type and suggest the likely cause of each. A missing reference usually means a payment without a remittance note. A short payment usually means a deduction. That grouping saves the thinking time even when the numbers came from your own formulas.
Keep the two passes separate. The first finds facts, the second offers explanations, and mixing them invites the model to invent a cause for a mismatch that does not exist.

Common problems
- The model reports a match that is not there. The reference formats differ, such as INV-1001 against 1001. Normalise both columns first.
- Amounts are compared as text. Strip currency symbols and use numbers.
- The list was truncated in the paste. Long pastes get cut. Split into batches and reconcile the batches separately.
- Duplicates are missed. Ask explicitly for repeated references in each list.
- The answer is a paragraph. The output format was not specified. Ask again with the columns named.
- Nobody can check the result. Add the COUNTIF column, so the finding survives without the chat.
Questions and answers
Can ChatGPT compare two lists for me?
Yes, if you give it both lists and name the output format. Verify the result in the sheet before you rely on it.
Should I upload the spreadsheet instead of pasting?
Either works. A small extract pasted into the prompt is easier to check line by line.
What is the best output format to ask for?
A table with one row per problem and a column for each list's amount.
How do I confirm the result?
With COUNTIF in both directions and a subtraction for amounts, so the finding is arithmetic rather than a claim.
Is this safe for financial records?
Only with the same care you would give any paste into an outside tool. Check what your tool retains, and keep the sheet as the record of truth.
