Day 4 — COUNTIF, SUMIF and the IFS family
Counting and totalling only the rows that match a condition. This is the heart of every MIS report.
COUNTIF
Every formula on this page runs against the Sales sheet below. The row numbers and column letters are real — F2 really is 165000.
">100000", not >100000. It looks wrong the first few times. Excel treats the whole condition as a piece of text it then interprets.SUMIF
North sold 256,800. Laptops alone account for 825,000 of the 1,068,000 total.
When you leave the third argument out, SUMIF adds up the same range it checked — that is what the last line above does: it totals the amounts that are themselves over 100000.
Criteria can be a cell, not a typed value
Hard-coding "North" inside a formula means editing the formula to change the region. Point at a cell instead:
The last one uses & to glue the operator onto the cell value, giving "everything that is not North". Joining an operator to a reference like this is the standard trick for flexible criteria.
Wildcards
* stands for any number of characters, ? for exactly one.
COUNTIFS and SUMIFS — more than one condition
All the conditions must be true on the same row — the conditions are joined with AND, never OR.
Between two values
There is no BETWEEN in Excel. You give two conditions on the same range:
Dates as criteria
Q1 brought in 484,200 and everything from April onwards 583,800 — which together make the full 1,068,000, a quick way to prove you have not missed any rows.
">=01/04/2025" depends on regional settings and will behave differently on a colleague's machine. DATE(2025,4,1) is unambiguous everywhere.AVERAGEIF
The average laptop order is 137,500 while the average mouse order is 8,100 — the kind of gap that a single overall average completely hides.
Try these yourself
- Count how many orders came from the East region.
- Total the amount for all Monitor orders.
- Count orders where the quantity is 5 or more.
- Total the West region amount for Laptops only.
- Count the orders placed in February 2025 using two date conditions.
