
In Excel, the SUMIFS function is very useful for calculating the sum of values that meet specific criteria. When used with the INDIRECT function, you can flexibly adjust criteria based on cell values, making analysis much easier.
1. Understanding the Basic SUMIFS Structure
The SUMIFS function is used to sum cells that meet multiple criteria at the same time.
=SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2 ...)
2. Sample Data
Assume you have data like the following.
| Product | Sales Volume |
|---|---|
| A | 120 |
| B | 90 |
| C | 150 |
| D | 80 |
To find the sum of items with sales volumes greater than 100, use the following formula:
=SUMIFS(B2:B5, B2:B5, ">100")
3. Referencing the Criterion Value in a Cell
What if you enter the criterion number, 100, in a cell (C1) and want to use that value as the criterion?
=SUMIFS(B2:B5, B2:B5, ">" & C1)
This automatically updates the criterion whenever the value in C1 changes.
4. Combining It with the INDIRECT Function
If the criterion cell is not fixed—for example, if it changes based on another sheet or a user selection—the INDIRECT function can help.
Example: Cell D1 contains the address of the cell to reference (such as C1 or C2) as text.
=SUMIFS(B2:B5, B2:B5, ">" & INDIRECT(D1))
Explanation: If D1 contains “C1,” INDIRECT(D1) refers to cell C1. This structure lets users indirectly control the criterion cell.
5. Less Than or Equal To Criteria Can Be Applied the Same Way
=SUMIFS(B2:B5, B2:B5, "<=" & INDIRECT(D1))
By changing only the operator, you can use >, <, =, >=, and <=.
Summary
- Use
SUMIFSto calculate sums based on multiple criteria. - You can set criteria using cell references instead of fixed numbers.
- With
INDIRECT, you can change a criterion cell address to text and reference it indirectly. - Use comparison operators (
>=,<, and so on) through text concatenation.
Frequently Asked Questions (FAQ)
- Q1. When is the INDIRECT function needed?
Use it when you want to dynamically change the criterion cell address based on user input or worksheet settings. - Q2. Can I use it when the criterion is text rather than a number?
Yes, but the comparison operator will use text criteria, so an exact text match is required. - Q3. Can INDIRECT reference cells on another worksheet?
Yes. For example:INDIRECT("Sheet2!C1"). - Q4. Can I use SUMIF instead of SUMIFS?
If you have only one criterion, you can useSUMIF. - Q5. Can I use a drop-down list instead of a cell reference?
Yes. Select an address from a drop-down list and use INDIRECT to retrieve that cell.