Debit and Credit in Separate Columns: Getting the One Signed Column Your Software Wants
Accounting software wants one amount column with signs. Statements print two columns without them. The conversion is trivial and the failure mode is silent.
5 min read
Bank statements print two amount columns — paid in and paid out — and neither carries a sign. Accounting software wants one column, signed. The conversion is a single rule, and getting it backwards produces a file that imports perfectly and is completely wrong.
That combination — trivial to do, silent when wrong — is what makes this worth a careful look.
The rule
Money in is positive. Money out is negative.
QuickBooks, Xero, Sage, Wave and every OFX-based format read a single amount column this way. A payment of 320 is -320.00. A deposit of 1,250 is 1250.00.
Merging the two columns:
- Row has a value in the credit column → take it as-is, positive.
- Row has a value in the debit column → negate it.
- Row has values in both → this is not a transaction, it is a subtotal or a page carry-forward line. It should not be in your data at all.
That third case catches more errors than the first two combined. A row with both columns populated is nearly always page furniture that has been parsed as a transaction.
Why the failure is silent
Import an inverted file and nothing complains. The dates are valid, the amounts are valid, the descriptions are fine. Every row imports.
The result is a set of books where income is expenditure and expenditure is income. The profit and loss is inverted. The VAT return is wrong in an interesting direction. And the only external sign is that the closing balance is a long way from reality — which, if you are not reconciling, you may not look at for a month.
No validation rule catches this, because there is nothing invalid about the file. Only arithmetic against an independent figure catches it.
The thirty-second check
Sum the signed amount column. Compare against the closing balance minus the opening balance.
sum(amounts) = closing − opening
That is the whole test. Three outcomes:
Equal. The signs are right and no rows are missing.
Same magnitude, opposite sign. Every sign is inverted. If the account moved +2,340 over the period and your column sums to −2,340, the columns were swapped. This is unmissable here and invisible everywhere else.
Different magnitude. Some signs are wrong, or rows are missing. If the difference is exactly twice a transaction you can find, that single row has the wrong sign — one row flipped moves the total by twice its value, once for the money that should have gone out and once for the money that wrongly came in.
Building this into a spreadsheet takes one cell and turns the check into a glance. It is the same check that underpins the proof that a conversion is complete, applied to signs specifically.
Column headings are not reliable
The obvious approach is to read the headings. It works until it does not, and the failures are common enough to plan for.
Banks use, among others: Paid in / Paid out. Credit / Debit. Deposits / Withdrawals. Money in / Money out. Receipts / Payments. In / Out. And on many statements, no heading on the second and subsequent pages at all.
Worse, "debit" and "credit" mean the opposite thing on a bank statement to what they mean in your ledger. The statement is written from the bank's point of view: your deposit is a credit to your account and a liability to them. A tool — or a person — carrying double-entry instincts into a statement can invert the whole thing on the strength of the word "credit".
More robust signals than the heading:
Column position. On the overwhelming majority of statements, paid-out sits left of paid-in, and the running balance sits right of both.
The running balance. This is decisive. If the balance goes up on a row, that row is money in, whatever any heading says. Where a statement prints a running balance, the signs can be derived from it entirely and the headings ignored.
Relative frequency and size. On a typical current account, debits are many and small, credits are few and large. A column with 380 entries averaging 40 is the payments column. This is a hint, not proof — a deposit account inverts it — and is worth using only where nothing better is available.
Two edge cases worth handling deliberately
Refunds and reversals. A refund appears in the credit column and is genuinely money in, so the rule holds. Some statements instead print a negative number in the debit column, meaning "a payment that was reversed". Negating a negative gives a positive, which is correct — but only if the minus sign survived extraction. If your amounts are parsed as unsigned, this row silently doubles the error.
Credit card statements are inverted. On a card statement, a purchase increases what you owe. Whether a purchase is positive or negative depends on how the account is modelled in your books — as a liability, a purchase increases the balance. Whatever convention you choose, the check still applies: the signed column must sum to the movement in the printed balance. Get that right and the convention is internally consistent, which is what matters.
After the merge
Once you have one signed column, the rest of the export follows:
- CSV for QuickBooks or Xero — a single Amount column, signed, with no currency symbols and no thousands separators.
- OFX or QBO — the format specifies signed amounts natively, and adds a transaction ID so a re-import does not duplicate. Which format to choose.
Do not ship both a signed column and the original debit and credit columns in the same import file. Some importers will map both and count every transaction twice, which is the second-worst outcome after inversion and considerably harder to unpick.
Common questions
- Should a withdrawal be negative or positive in an import file?
- Negative, in every format that uses a single amount column — QuickBooks, Xero, and OFX all read money leaving the account as a negative number. Getting this backwards inverts the whole statement and it still imports cleanly.
- How do I check the signs came out right?
- Sum the column and compare it against the movement between the opening and closing balances. If the signs are inverted, the total will have the right magnitude and the wrong sign, which is impossible to miss and impossible to spot by reading rows.
Read next
- How to Convert a Bank Statement PDF to Excel Without Re-Checking It by HandAny converter can produce a spreadsheet. The question is whether you can trust it without reading all 400 rows. Here is what separates the two, and how to test it in a minute.
- CSV, XLSX, QBO or OFX: Which Export Your Accounting Software Actually WantsPicking the wrong export format turns a five-minute import into an afternoon. Each format carries different information, and only some of them carry the bank’s own transaction IDs.