- SUMIFS adds values in a column that meet multiple conditions: for example, a specific account AND a given period.
- Standard formula: =SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2, …) with absolute references ($) so it can be copied.
- For a monthly period, combine two date criteria: greater than or equal to the 1st of the month, and less than or equal to EOMONTH.
- This summary table replaces manual filtering and serves as the foundation for monthly reporting.
A general ledger spanning thousands of rows is not meant to be read line by line: it is meant to be summarised. The SUMIFS function (SOMME.SI.ENS in French-language Excel) lets you build an expense schedule by account and month in minutes, updating automatically whenever new entries are added. This tutorial walks through every step.
What we are going to build
Starting from a general ledger extract (date, account, description, debit), we want a table showing, for each expense account, the total debited each month.
Step 1: prepare the data
Place the journal entries in a sheet named “General ledger”, with columns: Date, Account, Description, Debit, Credit. Four rules that prevent 90% of issues:
- one row = one entry, with no blank rows or subtotals in the middle;
- dates are real Excel dates (right-aligned by default), not text;
- accounts all share the same format (all text or all numbers);
- amounts are numbers (no text containing spaces or letters).
Figure 1: the general ledger extract (reconstructed screenshot). The data occupies A1:E8. (Note: the screenshots in this tutorial show the French-language Excel interface, while the formulas in the text use English Excel syntax.)
Step 2: set up the summary table
In a clear area (here columns G to I), create:
- In G1 the heading “Account”, then in G2:G4 the list of accounts to analyse: 6111, 6125, 6136.
- In H1 the date 01/01/2026 and in I1 the date 01/02/2026. Apply the custom cell format
mmm-yyso they display as “Jan-26” and “Feb-26”: each cell still holds a full date, which is essential for the calculation.
Step 3: write the formula
Select H2 and enter:
=SUMIFS($D$2:$D$8,$B$2:$B$8,$G2,$A$2:$A$8,">="&H$1,$A$2:$A$8,"<="&EOMONTH(H$1,0))
Breakdown:
| Argument | Role |
|---|---|
$D$2:$D$8 |
Sum range: Debit column |
$B$2:$B$8,$G2 |
First criterion: the account (column B) must match the value in G2 |
$A$2:$A$8,">="&H$1 |
Second criterion: date greater than or equal to the 1st of the month |
$A$2:$A$8,"<="&EOMONTH(H$1,0) |
Third criterion: date less than or equal to the last day of the month (EOMONTH with 0 returns the end of the month in H1) |
The & operator concatenates the comparison operator (>=) with the date: this is required so Excel evaluates the date as a serial number inside the criterion.
Figure 2: the formula in the formula bar (marker 3), the months in the header row (marker 2), and the accounts in column G (marker 1). The green frame indicates the area populated by copying across and down. (Screenshot shows the French-language Excel interface using
SOMME.SI.ENS, FIN.MOIS and ; separators.)
Step 4: copy the formula across the table
Why use $ signs? They lock the parts of the formula that must not shift:
$D$2:$D$8,$B$2:$B$8,$A$2:$A$8: the data ranges remain fixed for every cell;$G2: column G is locked, while the row moves freely (the formula follows the accounts downwards);H$1: row 1 is locked, while the column moves freely (the formula follows the months to the right).
Select H2, copy (Ctrl+C), select H2:I4 and paste (Ctrl+V). Excel recalculates each cell.
Expected results:
| Account | Jan-26 | Feb-26 |
|---|---|---|
| 6111 | 82,000.00 | 41,500.00 |
| 6125 | 8,500.00 | 8,900.00 |
| 6136 | 10,000.00 | 10,000.00 |
Check: 50,000 + 32,000 = 82,000 for 6111 in January ✔.
Step 5: add totals and controls
- Monthly total:
=SUM(H2:H4). - Completeness check: the table total must equal the total of the Debit column for the relevant accounts (
=SUMIFS($D$2:$D$8,$B$2:$B$8,"61*")if accounts are stored as text). - Conditional formatting to highlight any month up by more than 20%: see conditional formatting for automatic alerts.
Useful variants
| Requirement | Formula |
|---|---|
| Full-year total for one account | =SUMIF($B$2:$B$8,$G2,$D$2:$D$8) |
| Entire class 61 (accounts as text) | =SUMIFS($D$2:$D$8,$B$2:$B$8,"61*") |
| Amount greater than 10,000 | =SUMIFS($D$2:$D$8,$B$2:$B$8,$G2,$D$2:$D$8,">10000") |
| Number of entries for the account | =COUNTIFS($B$2:$B$8,$G2) |
| Debit - credit (balance) | =SUMIFS(Debit,…)-SUMIFS(Credit,…) |
Common errors
- Mismatched range sizes:
#VALUE!. All ranges must have the exact same number of rows. - Relative references instead of absolute ones: ranges shift when copied and produce wrong totals.
- Dates stored as text: date criteria fail. Convert with
=DATEVALUE()or Data > Text to Columns. - Mixed account formats: 6111 (number) does not equal “6111” (text). Standardise using
=TEXT(B2,"0"). - Formula separator: in English-language Excel (UK/US regional settings), arguments are separated by
,, whereas in French or continental European regional settings they are separated by;.
Practical case: an aged receivables schedule with SUMIFS
A customer invoice file contains, for each invoice, the customer, due date and outstanding balance. We want to break down each customer’s balance by overdue bracket.
| Invoice | Customer | Due date | Balance due (MAD) |
|---|---|---|---|
| F-201 | Atlas | 20/04 | 40,000 |
| F-208 | Atlas | 05/05 | 25,000 |
| F-215 | Atlas | 12/06 | 30,000 |
| F-219 | Atlas | 28/06 | 15,000 |
| F-224 | Atlas | 20/07 | 60,000 |
Analysis date: 30/06. Brackets are defined relative to this date (used instead of TODAY() to lock the calculation, in a named cell Analysis_date).
| Bracket | Formula (customer in A2) |
|---|---|
| Not due | =SUMIFS(Balance,Customer,$A2,DueDate,">="&Analysis_date) |
| 1 to 30 days overdue | =SUMIFS(Balance,Customer,$A2,DueDate,"<"&Analysis_date,DueDate,">="&Analysis_date-30) |
| 31 to 60 days overdue | =SUMIFS(Balance,Customer,$A2,DueDate,"<"&Analysis_date-30,DueDate,">="&Analysis_date-60) |
| Over 60 days overdue | =SUMIFS(Balance,Customer,$A2,DueDate,"<"&Analysis_date-60) |
Result for customer Atlas as at 30/06:
| Invoice | Due date | Days overdue at 30/06 | Bracket | Amount |
|---|---|---|---|---|
| F-201 | 20/04 | 71 days | Over 60 days | 40,000 |
| F-208 | 05/05 | 56 days | 31 to 60 days | 25,000 |
| F-215 | 12/06 | 18 days | 1 to 30 days | 30,000 |
| F-219 | 28/06 | 2 days | 1 to 30 days | 15,000 |
| F-224 | 20/07 | not yet due | Not due | 60,000 |
| Bracket | Amount | Share of balance (170,000) |
|---|---|---|
| Not due | 60,000 | 35.3% |
| 1 to 30 days | 45,000 | 26.5% |
| 31 to 60 days | 25,000 | 14.7% |
| Over 60 days | 40,000 | 23.5% |
| Total | 170,000 | 100% |
The sum of the four brackets must equal the total outstanding balance (170,000): this serves as the control check. The MAD 40,000 overdue by more than 60 days calls for action (formal reminder, provision assessment: see the article on doubtful debts).
Key rules for date-based formulas
- Concatenate the operator and the date with
&:">="&Analysis_date, never">=Analysis_date". - Dates are numbers:
Analysis_date-30gives the date thirty days earlier. - Non-overlapping boundaries: use
<on one side and>=on the other, otherwise an invoice on the boundary is counted twice. - Equal-sized ranges: every range inside a SUMIFS must have the exact same row count.
- Named ranges (Balance, Customer, DueDate) keep formulas readable and prevent alignment errors as the table grows.
Period totals with date criteria
SUMIFS supports comparison operators in criteria, allowing you to break down a general ledger by month, quarter or financial year. With dates in column A, accounts in B, debits in D and credits in E, and period start and end dates in cells G1 and H1:
| Requirement | Formula |
|---|---|
| Account debit over a period | =SUMIFS($D:$D,$B:$B,$G3,$A:$A,">="&$G$1,$A:$A,"<="&$H$1) |
| Class 6 debits for March | =SUMIFS($D:$D,$B:$B,"6*",$A:$A,">="&DATE(2026,3,1),$A:$A,"<="&EOMONTH(DATE(2026,3,1),0)) |
| Account balance (debit - credit) at a date | =SUMIFS($D:$D,$B:$B,$G3,$A:$A,"<="&$H$1)-SUMIFS($E:$E,$B:$B,$G3,$A:$A,"<="&$H$1) |
| Count of entries over 50,000 on an account | =COUNTIFS($B:$B,$G3,$D:$D,">50000") |
| Sum of descriptions containing “fees” | =SUMIFS($D:$D,$C:$C,"*fees*") |
Text criteria support wildcards (* for any sequence of characters, ? for a single character). For accounts stored as numbers, "6*" will not work: either convert the column to text or use numeric bounds (">=6000" and "<7000").
A monthly expense dashboard by class
Build a twelve-column table (months) with expense categories on the rows (purchases, external charges, staff costs, etc.):
| Step | Action |
|---|---|
| 1 | Row 1: enter 01/01/2026 in B1, then =EOMONTH(B1,0)+1 in C1, and copy across all twelve months |
| 2 | Column A: list account prefixes (“611”, “613”, …) |
| 3 | Formula in B2: =SUMIFS(General_ledger[Debit],General_ledger[Account],$A2&"*",General_ledger[Date],">="&B$1,General_ledger[Date],"<="&EOMONTH(B$1,0)) |
| 4 | Total row: =SUM(B2:B9) and a year-to-date column |
| 5 | Check: the annual table total equals =SUMIF(General_ledger[Account],"6*",General_ledger[Debit]) |
The schedule refreshes with every new general ledger export. Conditional formatting highlights months where an expense exceeds the prior months’ average by more than 20%.
Comparing two financial years
With a general ledger covering two years, a “Year” column (=YEAR([@Date])) enables year-on-year comparison:
| Account | N-1 | N | Variance | Variance % |
|---|---|---|---|---|
| 613 Leases & rentals | 540,000 | 585,000 | +45,000 | +8.3% |
| 616 Insurance premiums | 62,000 | 91,000 | +29,000 | +46.8% |
| 617 Staff costs | 2,450,000 | 2,700,000 | +250,000 | +10.2% |
| 618 Other external charges | 310,000 | 342,000 | +32,000 | +10.3% |
Formulas: N-1 =SUMIFS(Debit,Account,$A2,Year,2025), N identical with 2026, variance =C2-B2, percentage =D2/B2. Variances above a threshold (for example 20% and MAD 20,000) are flagged and documented in the file. In the example, insurance premiums (+46.8%) warrant checking: new policy, rate increase or adjustment?
Identifying the largest amounts
To list the five largest expenses in an account, combine LARGE and XLOOKUP:
=LARGE(IF(Account="6136",Debit),1) (an array formula in older versions) for the top amount, then =XLOOKUP(value,Debit,Description) to retrieve the description. This top-five list provides an immediate view of spending concentration and supports supplier review.
Five errors that produce wrong totals without an error message
- Criterion
">=01/01/2026"in quotes without concatenation: the date must be joined with&(">="&G1). - Sum range shifted by one row relative to the criteria ranges.
- Amounts imported as text (left-aligned) and silently ignored by the sum.
- Account numbers with trailing spaces or leading zeros:
"6111 "is not equal to"6111". - Relative range references after copying: without
$, ranges shift.
Checking the total independently (via a PivotTable or SUMIF) after every formula edit catches these issues before they cause downstream errors.
Going further
Once data exceeds a few thousand rows, convert the range into an Excel Table (Ctrl+T): ranges become structured references (Table1[Debit]) that expand automatically. Excel 365 adds dynamic array functions (FILTER, UNIQUE, SUMIFS with tables), while SUMIFS remains compatible across all versions.
This summary naturally feeds into a monthly dashboard and budget tracking. A cash-flow forecast template shows how to connect this type of calculation to projections.
Taking it further
These techniques link directly with other tutorials: PivotTables for accounting to explore data without formulas, lookup functions to label accounts, bank reconciliation and cleaning imported accounting data before running calculations. A workbook built on these building blocks updates month after month simply by replacing the general ledger export.
Frequently asked questions
What is the difference between SUMIF and SUMIFS?
SUMIF accepts a single criterion; SUMIFS accepts up to 127. Watch the argument order: in SUMIFS, the range to sum comes first.
Why is my result zero even though the data exists?
Common causes: account numbers are stored as text in one column and numbers in the other, dates are stored as text, ranges are not the same size, or a trailing space is hiding in the data (use TRIM or convert to numbers).
How do I include an entire account class (all 61xx accounts)?
Use wildcards on text values: the criterion “61*” captures all accounts starting with 61, provided the account numbers are stored as text.
Can I use a PivotTable instead?
Yes, and it is recommended for large datasets. Formulas remain useful for fixed-layout reporting schedules that need to refresh without manual rearrangement.
Article written from the official texts and the firm’s engagement practice. It shows its publication date and, where applicable, its last review.