Summing Values Below a Threshold with SUMIF in Excel
Summing Values Below a Threshold with SUMIF in Excel. To add up values that are below a specific amount, you can use the SUMIF function in Excel. To do this, you must indicate the range of cells to inspect for the criterion, the value to use as the criterion, and the range from which you want to sum values. However, you can also use the same range to both sum values and inspect criteria.
In this guide, we will show you how to write a formula to sum values that are less than a certain amount, using the SUMIF function.
Summing Values Below a Threshold with SUMIF in Excel
Here are the steps to follow:
- First, type the SUMIF function into a cell.
- Next, in the first argument, refer to the range of cells where you need to inspect the criterion. In our example, this is the range of lot sizes.
- Now, specify the criterion. We will use the value 40 with the less than operator to add up all values that are less than 40.
- Then, refer to the range of cells from which you want to sum values. In our example, this is the range of quantities.
- Finally, press Enter to obtain the result.
The formula looks like this:
=SUMIF(A2:A10,”<40″,C2:C10)
As you can see, the result is 685. This means that the sum of all values in the quantity column where the value in the lot size column is less than 40 is 685.
When you use the less than sign with a value, it excludes that value while adding up values that are less than it. This means that with <40, the value 40 is not included. To include it, you need to use the equals sign as well, as shown in the following example:
=SUMIF(A2:A10,”<=40″,C2:C10)
Using the Less Than Value from a Cell
Suppose you want to use a cell’s value instead of specifying the value in the function. In that case, you need to write your formula as follows:
Here, you must use the less than sign with double quotation marks and then combine it with the cell containing the less than value using an ampersand.
=SUMIF(A2:A10,”<” & E5, C2:C10)
SUMIF Less than when you have the same range to inspect for criteria
Now let’s consider another scenario where you have the same range to add up values and to inspect the less than criterion.
In the above example, we referred to the quantity column in the criteria_range and specified <150 in the criterion, but we did not indicate a range in the sum_range argument. In SUMIF, sum_range is optional. If you skip it, the function will use the criterion range to add up values.
=SUMIF(C2:C10,”<150″)
In the above formula, SUMIF adds up values less than 150 from the quantity column.