Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Clean a General Ledger in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Cleaning a general ledger in Excel means removing duplicates, fixing inconsistent account names, correcting dates and amounts, and filling gaps so the ledger is accurate and ready for reporting. The core steps are: back up the file, sort and filter to spot anomalies, use formulas like TRIM, PROPER, and TEXT to standardise entries, remove duplicates with Remove Duplicates, and validate totals against your source system. You will need the ledger exported as a spreadsheet, basic Excel skills, and a copy of the original data to compare against.

What You'll Need

  • Your general ledger exported from accounting software as .xlsx or .csv
  • Microsoft Excel (desktop version recommended; web version has fewer features)
  • A backup copy of the original file
  • Knowledge of your chart of accounts and expected date range

Step-by-Step

  1. Back up the file. Save a copy of the original ledger as GL_original_backup.xlsx before making any changes. Work only on a duplicate.
  2. Inspect the structure. Open the file and confirm columns: typically Date, Account, Description, Debit, Credit, Balance. If your export has merged cells or multiple header rows, unmerge and delete extra rows so each column has one clear header.
  3. Convert to a table. Select the data range and press Ctrl+T (Cmd+T on Mac) to create an Excel Table. This enables filter buttons and structured references. Name the table (Table Design > Table Name) as GL_Table.
  4. Check for blank rows and subtotals. Filter each column for blanks. Delete entire blank rows. Remove any subtotal or total rows that are mixed into the data—they will distort pivot tables and formulas.
  5. Standardise dates. Select the Date column. Use Data > Text to Columns with Delimited > Next > Next > Column data format: Date (MDY or DMY as per your source) to force correct parsing. Then format as Short Date. Look for impossible dates (e.g., 31/02) and correct them using the original source.
  6. Clean text fields. In a helper column next to Description, enter =TRIM(PROPER(C2)) to remove extra spaces and capitalise consistently. Copy the result, then Paste Special > Values over the original column. Delete the helper column.
  7. Standardise account names. Use a lookup table: list all unique account names in a new sheet, then map variants (e.g., "Cash", "CASH", "Cash Account") to one canonical name. Apply with VLOOKUP or XLOOKUP in a helper column, then replace the original values with Paste Special > Values.
  8. Fix numbers stored as text. Select Debit and Credit columns. If numbers are left-aligned, use Data > Text to Columns > Finish, or multiply by 1 in a helper column. Ensure no currency symbols or spaces remain. Format as Number with two decimals.
  9. Remove duplicates. With the table selected, go to Data > Remove Duplicates. Check all columns that together define a unique entry (Date, Account, Description, Debit, Credit). Click OK. Excel will report how many duplicates were removed—compare against your backup to ensure you did not delete legitimate identical transactions (e.g., two identical small purchases on the same day). If unsure, use a helper column with =COUNTIFS(...) to flag duplicates first and review manually.
  10. Validate totals. Sum the Debit and Credit columns. Compare to the trial balance or ledger totals from your accounting system. If they differ, filter for outliers: very large amounts, negative values in debit, or zero amounts. Investigate each.
  11. Check for gaps. Sort by Date. Look for missing date ranges (e.g., a week with no entries). Confirm with the source system whether that is expected.
  12. Finalise and save. Save as GL_clean.xlsx. Optionally, create a pivot table (Insert > PivotTable) to summarise by account and verify balances.

Common Mistakes

  • Deleting duplicates without checking—identical transactions can be legitimate.
  • Overwriting the original file instead of working on a copy.
  • Using TRIM on numbers, which converts them to text.
  • Forgetting to remove subtotal rows, leading to double-counting.
  • Assuming all dates are in the same format; mixed formats cause sorting errors.
  • Not validating totals against the source system after cleaning.

Tips

  • Use conditional formatting to highlight blanks, duplicates, or negative values in debit/credit columns.
  • Keep a "cleaning log" sheet listing changes made, so you can reverse if needed.
  • For large ledgers, use Power Query (Data > Get & Transform) to automate cleaning steps and refresh monthly.
  • Always keep the original export until you have reconciled the cleaned version.

Troubleshooting

  • Remove Duplicates removed too many rows: Restore from backup and use a helper column with COUNTIFS to flag duplicates, then review each flagged row before deleting.
  • Dates won't sort correctly: They may be stored as text. Use Text to Columns with Date format, or use =DATEVALUE() in a helper column.
  • Totals don't match source: Check for hidden rows, filtered-out rows, or subtotals. Also verify that all debits and credits are positive numbers (some systems use negatives).
  • Formulas return errors: Ensure no blank cells in lookup ranges; use IFERROR to handle missing matches.
  • File is slow: Convert to Excel Table and avoid whole-column references in formulas; use structured references instead.

Frequently Asked Questions

Can I clean a general ledger in Excel without accounting software?

Yes, but you need the exported data. Excel alone cannot generate a ledger from scratch; it cleans and validates existing data.

How do I know which duplicates to remove?

Review flagged duplicates manually. Identical entries on the same date with the same amount and description may be legitimate (e.g., two identical coffee purchases). Only remove if you are certain they are data entry errors.

What if my ledger has multiple sheets per month?

Consolidate them first using Power Query (Data > Get & Transform > Append) or copy-paste into one sheet, then clean the combined data.

Do I need to clean the ledger every month?

Yes, regular cleaning prevents errors from accumulating. Automate with Power Query to save time.

Can I use Excel's Filter to find errors?

Yes, filter each column for blanks, text in number columns, or unusual dates. Combine with conditional formatting for visual checks.

Is it safe to delete rows with zero amounts?

Only if they are truly non-transactions. Some zero-amount rows may represent adjustments or reversals; check with your accountant before deleting.