Subtotal invoice amounts by age in Excel
To sum the invoice amounts based on age as below screenshot shown may be a common task in Excel, this tutorial will show how to subtotal invoice amounts by age with a normal SUMIF function.
Subtotal invoice amount based on age with SUMIF function
Dealing with this task, you can use a simple SUMIF function in Excel, the generic syntax is:
=SUMIF(range, criteria, sum_range)
- range: The range of cells which criteria is applied.
- criteria: The criteria to sum data based on;
- sum_range: The range of cells that you want to sum.
For example, I want to sum all the invoice amounts whose age is less than or equal to 30, or whose age is greater than 30, please apply the following formula:
1. Enter or copy the below formula into a blank cell:
=SUMIF($B$2:$B$10,F2,$D$2:$D$10)
2. And then, drag the fill handle down to copy the formula to other cells, and the amount subtotals will be calculated, see screenshot:
Relative function used:
- SUMIF:
- The SUMIF function can help to sum cells based on one criterion.
More articles:
- Sum Values By Group In Excel
- Sometimes, you may have the requirement to sum values based on group in a table. For example, I have a list of products with their corresponding amounts in another column, now, I want to get the subtotal amount for each product as below screenshot shown. This tutorial will introduce some formulas for solving this task in Excel.
- Sum Smallest Or Bottom N Values
- In Excel, it is easy for us to sum a range of cells by using the SUM function. Sometimes, you may need to sum the smallest or bottom 3, 5 or n numbers in a data range as below screenshot shown. In this case, the SUMPRODUCT together with the SMALL function can help you to solve this problem in Excel.
- Sum Smallest Or Bottom N Values Based On Criteria
- In previous tutorial, we have discussed how to sum the smallest n values in a data range. In this article, we will perform a further advanced operation – to sum the lowest n values based on one or more criteria in Excel.
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
