You don’t need to be an Excel wizard to keep good books. You need about fifteen formulas, and you need to know which one answers which question. How much did we spend on software this month? Which invoices are past due, and by how many days? What GL account does this category map to? Is rent over budget? Each of those is one formula, and once you’ve written it you never do that math by hand again.
This guide walks through the 15 Excel formulas every bookkeeper should know, each with a real bookkeeping example, the exact formula and the result. You also get a free practice workbook built on the same small-business ledger, and an online formula tester that runs all 15 formulas on your own numbers.
Free, no sign-up. Works in Excel, Google Sheets and LibreOffice. Includes a 100-row transactions ledger with row formulas, an accounts table with GL numbers and budgets, all 15 formulas with live results, and 8 practice exercises that check your answers.
Free online Excel formula tester
The example below is a small design studio with 17 transactions. Pick a category, a month, a customer and an invoice, and every formula updates. Edit the rows or paste your own, change the accounts list, and you’ll see the formula you’d type in Excel next to the result it gives. You can print the report, save it as a PDF, download Excel, Word or CSV, or send a link.
3. The 15 formulas, run on your data
Row formulas (copy these down a column)
Formulas use the named ranges from the free workbook (TAmt, TCat, TDate, TType, TParty, TRef, TDue, TPaid, AccTable, AccCat, AccGL, AccBudget). In your own file you can swap in plain ranges such as F6:F105.
Made with the free Excel formula tester at bookkeepingsheets.com
The example ledger
All 15 examples use the same small ledger. Each row has a date, a reference, the customer or vendor, a category, Income or Expense, the amount, a due date and a paid flag. In the workbook those columns have names: TDate, TRef, TParty, TCat, TType, TAmt, TDue and TPaid. A second table, AccTable, lists each category with its GL account number and monthly budget.
Names make formulas readable. =SUMIF(TCat,"Software",TAmt) says what it does. =SUMIF(D6:D105,"Software",F6:F105) makes you go and look. In your own file you can use either. To create a name in Excel, select the column range and type the name in the Name Box to the left of the formula bar. In Google Sheets, use Data > Named ranges.
The as-of date in the example is fixed at November 20, 2026 so the numbers match this article. In your own file, use =TODAY() instead.
The 15 formulas at a glance
| # | Function | Bookkeeping question | Result in the example |
|---|---|---|---|
| 1 | SUM | Control total of the Amount column | $19,767.33 |
| 2 | SUMIF | Total Software spending, all dates | $266.98 |
| 3 | SUMIFS | Software spending in November 2026 | $176.99 |
| 4 | COUNTIFS | Number of past-due customer invoices | 3 |
| 5 | AVERAGEIFS | Average invoice for Harbor Dental | $1,800.00 |
| 6 | IF | Is Software over its $150 monthly budget? | Over budget |
| 7 | IFERROR | Software as % of November income | 4.45% |
| 8 | VLOOKUP | GL account for Software | 6200 |
| 9 | INDEX + MATCH | Monthly budget for Software | $150.00 |
| 10 | ROUND | 1.5% late fee on past-due invoices | $76.88 |
| 11 | EOMONTH | Last day of the month | Nov 30, 2026 |
| 12 | TODAY (date math) | Days INV-0995 is past due | 36 |
| 13 | TEXT | Month label for a report header | November 2026 |
| 14 | SUMPRODUCT | Total past-due receivables | $5,125.00 |
| 15 | TRIM | Clean extra spaces from a bank export | ADOBE *CREATIVE CLOUD CA |
Summing and counting
1. SUM: the control total
=SUM(TAmt) adds every amount in the column: $19,767.33 in the example. On its own that number mixes income and expenses, so it isn’t a business result. It’s a control total. When you paste in a bank or QuickBooks export, compare SUM with the total on the source report. If they differ, a row went missing or a number came in as text, and you find out before you build anything on top of it.
A useful variant is the running balance. In row 6, =SUM($F$6:F6) adds everything from the first row down to the current one. Copy it down and the $ keeps the start fixed while the end moves. The workbook’s Transactions sheet uses the same trick with SUMIF to show a running net of income minus expenses.
2. SUMIF: one condition
=SUMIF(TCat,"Software",TAmt) reads: look down the category column, and wherever it says Software, add the amount from the same row. Result: $266.98 across October and November. The order is range to test, what to look for, range to add. Put the criterion in a cell (the workbook uses SelCat) and you can change the category without touching the formula.
3. SUMIFS: several conditions, including dates
SUMIFS is the bookkeeper’s workhorse. The sum range comes first, then pairs of range and criterion:
=SUMIFS(TAmt,TCat,"Software",TDate,">="&DATE(2026,11,1),TDate,"<="&DATE(2026,11,30))
That gives November Software spending: $89.99 (Adobe) + $42.00 (Google) + $45.00 (Figma) = $176.99. Note how the date tests are written: the comparison sign goes in quotes and is joined to the date with &. Writing ">=11/1/2026" as plain text can work, but it depends on regional date settings. DATE() always works. This is the formula behind most monthly reports, including the budget vs. actual template.
4. COUNTIFS: how many?
=COUNTIFS(TType,"Income",TPaid,"No",TDue,"<"&TODAY()) counts customer invoices that are unpaid and past their due date. In the example that’s 3: INV-0995, INV-0998 and INV-1005. INV-1003 is unpaid but not due until November 27, so it isn’t counted. COUNTIFS uses the same range-and-criterion pairs as SUMIFS, just without a sum range.
5. AVERAGEIFS: the typical amount
=AVERAGEIFS(TAmt,TParty,"Harbor Dental",TType,"Income") averages Harbor Dental’s three invoices ($2,400, $1,800 and $1,200): $1,800. Use it for the average bill from a vendor or the average sale per customer. If nothing matches, AVERAGEIFS returns #DIV/0! because it would divide by zero. Formula 7 shows how to handle that.
Logic and error handling
6. IF: flag it
=IF(actual>budget,"Over budget","Within budget") turns a comparison into a label. November Software was $176.99 against a $150 budget, so the result is Over budget. In the Transactions sheet a nested IF assigns each row a status:
=IF(H6="Yes","Paid",IF(G6<TODAY(),"Past due","Open"))
Read nested IFs left to right: the first test that’s true wins. Keep it to two or three levels. Past that, a lookup table is easier to maintain.
7. IFERROR: no more #DIV/0! in reports
Software as a share of November income is $176.99 ÷ $3,975.00 = 4.45%. If a month has no income yet, that division returns #DIV/0!, and one error cell breaks every total that refers to it. Wrap it:
=IFERROR(software_total/income_total,0)
Use IFERROR on formulas where an error has an innocent cause (no data yet, a lookup value not entered). Don’t wrap everything. An unexpected #N/A from a lookup often means a typo in a category name, and you want to see it.
Lookups
8. VLOOKUP: find the GL account
=VLOOKUP("Software",AccTable,2,FALSE) looks for Software in the first column of the accounts table and returns the value from column 2, the GL account: 6200. Always use FALSE (exact match) as the last argument. Without it, VLOOKUP assumes the list is sorted and can return the wrong account without any warning. That’s one of the most common errors in bookkeeping spreadsheets.
9. INDEX + MATCH: the sturdier lookup
=INDEX(AccBudget,MATCH("Software",AccCat,0)) returns the Software budget: $150. MATCH finds the row number (the 0 means exact match), and INDEX returns the value from that row of another column. Unlike VLOOKUP, it doesn’t care which column is on the left, and inserting a column into the table doesn’t break it. The workbook uses it in every row to pull in the GL account, wrapped in IFERROR to show “Not in list” for unknown categories.
What about XLOOKUP? =XLOOKUP("Software",AccCat,AccBudget) does the same job in one function. It’s available in Microsoft 365, Excel 2021 and later, and Google Sheets, but not in Excel 2019 or older. If you share files with clients or a CPA on older versions, INDEX/MATCH is the safe choice. That’s why the free workbook sticks to it.
Numbers and dates
10. ROUND: cents, not fractions of cents
Past-due receivables are $5,125.00. A 1.5% monthly late fee is $76.875, which isn’t a real amount. =ROUND(5125*1.5%,2) gives $76.88. Formatting a cell to two decimals only changes what you see. The stored value is still $76.875, and those hidden fractions add up across a column until totals are off by a few cents. Round sales tax, late fees, allocations and payroll splits where they’re calculated. (Charge late fees only if your invoice terms allow them. Our late fee calculator covers the details.)
11. EOMONTH: month-end dates
=EOMONTH(DATE(2026,11,1),0) returns November 30, 2026. The second argument moves months: -1 gives the end of last month, 1 the end of next month. Use it for the “through” date in SUMIFS, for due dates like “end of next month,” and for grouping transactions by month. The first day of a month is =EOMONTH(date,-1)+1. EOMONTH handles leap years and 30- vs. 31-day months for you.
12. TODAY and date math: days past due
Excel stores dates as numbers (days since 1900), so subtracting two dates gives the days between them. =TODAY()-due_date is how many days an invoice is late. Wrap it in MAX so invoices that aren’t due yet show 0, not a negative number:
=MAX(0,TODAY()-INDEX(TDue,MATCH("INV-0995",TRef,0)))
INV-0995 was due October 15, so on November 20 it’s 36 days past due. That’s the core of every aging report. Our A/R aging template puts these days into 1–30, 31–60, 61–90 and 90+ buckets. One caution: TODAY() changes every day. For a month-end report you want to keep, type the as-of date in a cell instead.
13. TEXT: labels for reports
=TEXT(DATE(2026,11,1),"mmmm yyyy") returns “November 2026”. Use it to build headers like ="Profit and loss for "&TEXT(EOMONTH(TODAY(),-1),"mmmm yyyy"), or a Month column ("mmm yyyy") for a pivot table. The result is text, so use it for labels, not for further date math. TEXT(amount,"$#,##0.00") works the same way for money in a sentence.
Power tools
14. SUMPRODUCT: conditions SUMIFS can’t do
=SUMPRODUCT((TType="Income")*(TPaid="No")*(TDue<TODAY())*TAmt)
Each comparison in brackets gives a column of TRUE/FALSE values, which multiply as 1 and 0. Only rows where every test is true keep their amount. The result is total past-due receivables: $1,400 + $2,750 + $975 = $5,125. Here SUMIFS would work too, but SUMPRODUCT also handles conditions SUMIFS can’t, such as (MONTH(TDate)=11) or a calculation on each row before summing. It works in every version of Excel and in Google Sheets without special array entry.
15. TRIM: clean imported text
Bank and card exports are full of stray spaces: " ADOBE *CREATIVE CLOUD CA ". To Excel, “Adobe ” with a trailing space is a different vendor from “Adobe”, so SUMIF and lookups quietly miss it. =TRIM(text) removes leading and trailing spaces and cuts runs of spaces down to one: “ADOBE *CREATIVE CLOUD CA”. Pair it with PROPER() to fix capitals, or VALUE() to turn numbers stored as text back into numbers. One catch: TRIM doesn’t remove the non-breaking space (character 160) that some web exports use. For that, use =TRIM(SUBSTITUTE(A2,CHAR(160)," ")).
What’s inside the free workbook
- Start Here: how the file works and the list of named ranges.
- Formulas: all 15 formulas, each with the question it answers, the formula written out and a live result. Change the category, month, customer, invoice or as-of date at the top and everything recalculates.
- Transactions: a 100-row ledger (17 example rows) with row formulas you can copy: month label (TEXT), GL account (INDEX/MATCH with IFERROR), status (nested IF), days past due (MAX) and a running net (SUMIF with mixed references).
- Accounts: categories, GL account numbers and monthly budgets. Replace them with your own chart of accounts.
- Practice: 8 exercises, such as total rent for October, the GL account for Utilities, or how many days INV-0998 is past due. Type your formula and the Check column says Correct or Try again. Answers are at the bottom in light gray.
How to use it with your own data
- Export transactions from your bank, card or accounting software as CSV.
- Paste them into the yellow columns on Transactions (date, reference, customer or vendor, category, type, amount, due date, paid). Run TRIM on names first if the export is messy.
- Compare
=SUM(TAmt)with the export’s total. Fix any difference before going on. - Update the Accounts sheet with your categories, GL numbers and budgets. Any row showing “Not in list” has a category that isn’t on it.
- Change the yellow inputs on the Formulas sheet and copy whichever formulas you need into your own reports.
Common mistakes
- VLOOKUP without FALSE. It returns a near match, not an error, so a wrong GL account looks like a right one.
- Numbers stored as text. Imported amounts that are left-aligned or have a green triangle aren’t counted by SUM. Use VALUE, or Data > Text to Columns > Finish.
- Dates as text in SUMIFS.
">=11/1/2026"may fail in another region. Use">="&DATE(2026,11,1)or a date cell. - Relative references that drift. Copy
=SUMIF(D6:D105,…)down a column and the range moves with it. Lock it with$D$6:$D$105or use a named range. - Formatting instead of rounding. Two decimals on screen, four in the cell. Totals drift by pennies.
- Wrapping everything in IFERROR. It hides typos along with harmless errors. Use it only where you expect blanks.
- TODAY() in a closed-period report. The report changes every time you open it. Type the as-of date.
FAQ
What Excel formulas are used most in accounting?
SUMIFS, INDEX/MATCH (or VLOOKUP/XLOOKUP), IF and EOMONTH do most of the work: totals by category and month, lookups to the chart of accounts, flags and period-end dates. Add ROUND for money, COUNTIFS for counts, and TODAY-based date math for aging, and you can build most small business reports, from a bank reconciliation to a 13-week cash flow forecast.
Do these formulas work in Google Sheets?
Yes. All 15 work in Google Sheets with the same syntax, and the free workbook opens there without changes. Google Sheets also supports XLOOKUP and FILTER.
Should I use SUMIF or a pivot table?
Use a pivot table to explore data quickly. Use SUMIFS for reports you rebuild every month, because the layout stays fixed and new rows flow in automatically. Many bookkeepers explore with a pivot table and then build the final report with SUMIFS.
Is VLOOKUP or XLOOKUP better?
XLOOKUP is easier to write and defaults to an exact match, but it isn’t available in Excel 2019 or older. INDEX/MATCH works everywhere and doesn’t break when columns move. VLOOKUP is fine if you always use FALSE.
How do I sum by month in Excel?
Use SUMIFS with two date tests: on or after the first of the month, and on or before EOMONTH(first_day,0). Formula 3 above is the pattern. The bookkeeping in Excel guide shows how to build a full monthly P&L with it.
Related calculators and templates
- How to Build a Profit and Loss Statement in Google Sheets (Free P&L Template)
- How to Do Bookkeeping in Excel
- Small Business Budget Template
- Chart of Accounts Template
- Invoice Tracker Template
- Bank Reconciliation Template
- 13-Week Cash Flow Forecast Template
- Excel vs. QuickBooks vs. Xero
This guide and workbook are for general information and training. They aren’t accounting, tax or legal advice. For questions about your own business, talk to a qualified accountant.