You can sum numbers in Excel that fall between two specific values using the SUMIFS function, which is more flexible than the older SUMIF. You need a dataset with numbers and criteria ranges. You will build a formula that checks two conditions: one for the lower limit and one for the upper limit, then adds all numbers that satisfy both. This guide covers the exact steps, common errors, and troubleshooting for the SUMIF between two values formula.

What You'll Need

  • A spreadsheet application like Microsoft Excel, Google Sheets, or LibreOffice Calc.
  • A dataset containing at least one column of numbers to sum (the values) and at least one column containing the values to check against (the criteria).
  • Basic familiarity with selecting cells and typing formulas.

Step-by-Step

  1. Identify your data columns. Look at your spreadsheet. You need to know the range of cells that contain the numbers you want to add (the 'sum_range') and the range of cells that contain the values you want to check (the 'criteria_range'). For example, if your sales data is in column B and the dates are in column A, your sum_range is B:B and your criteria_range is A:A.
  2. Open the formula bar. Click on any empty cell where you want the result to appear. Press the equal sign key (=) to start typing a formula.
  3. Start the SUMIFS function. Type the function name exactly as SUMIFS. Unlike the older SUMIF function, SUMIFS allows you to add multiple criteria. The syntax for a basic SUMIFS formula is SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2, ...).
  4. Define the sum range. After typing SUMIFS, the first argument you provide is the range of numbers to add. Click and drag to select the column containing the values you want to sum. Ensure you include the entire column or the specific block of data you want to work with. For example, type B:B to select the whole column.
  5. Define the first criteria range. The next argument is the range of cells you want to check against your first value. Click and drag to select the column that contains the lower limit values. For example, if you want to sum sales between a start date and an end date, this would be the date column.
  6. Define the first criteria (lower limit). The third argument is the value that defines the start of your range. This is the number or value that a cell in the criteria_range must be greater than or equal to to be included. Type this value directly into the formula. You can click on the cell containing this number, or type it manually. For example, type ">=100" to include all numbers greater than or equal to 100.
  7. Define the second criteria range. The next argument is the range of cells for your second condition. This should be the same size and shape as the first criteria range. If you are using dates, this is the same date column. If you are using numbers, this could be a category column.
  8. Define the second criteria (upper limit). The final argument for the basic range check is the value that defines the end of your range. This is the number or value that a cell in the second criteria_range must be less than or equal to to be included. Type this value directly into the formula. Again, you can click on the cell containing this number or type it manually. For example, type "<=500" to include all numbers less than or equal to 500.
  9. Close the parenthesis and press Enter. Type the closing parenthesis ")" to finish the function. Press Enter on your keyboard. The cell will now display the total sum of all numbers in your sum_range that fall between your two specified values.
  10. Verify the result. Check the result manually by selecting a few numbers from your dataset. Confirm that the formula has correctly included the numbers that meet your criteria and excluded the others. If the result seems wrong, double-check that you used the correct comparison operators (>= and <=).

Common Mistakes

A very common error when using SUMIFS to sum between two values is mixing up the order of the arguments. The first argument must always be the sum_range. The second argument is the first criteria_range, and the third is the first criteria. If you swap these, the formula will return a #VALUE! error or an incorrect result. Always remember: Sum, Range 1, Criteria 1, Range 2, Criteria 2.

Another frequent mistake is using the SUMIF function instead of SUMIFS. SUMIF can only handle one condition. If you try to use SUMIF to find a sum between two numbers, you must use the AND operator (&) to create a range check inside the criteria argument, such as ">=100&<=500". This works but is less readable and can be more prone to errors than using SUMIFS with two separate criteria arguments.

Tips

When you are unsure if a cell is being included in the calculation, you can use the IF function to test a single cell against your criteria. For example, use the formula =IF(AND(A1>=100, A1<=500), "In Range", "Out of Range"). This will help you verify your logic before applying it to a large dataset.

For text-based criteria, such as summing values between two names or categories, you can use the double-asterisk wildcard (*). For instance, if you want to sum values for items starting with "A" and ending with "e", your criteria could be "A*e". This is useful for flexible pattern matching within your specified range.

Troubleshooting

If the result is zero or does not match your expectations, the first thing to check is your comparison operators. A common error is typing "<" instead of "<=" or ">" instead of ">=". This will exclude the boundary values. Ensure your formula uses the correct symbols to include the start and end of your range.

If you are getting a #VALUE! error, it is likely due to non-numeric data in your sum_range. SUMIFS will fail if it encounters text or other non-numeric characters in the column you are trying to sum. Scan your data for any stray spaces or text labels that might be interfering with the calculation.

If the result is a #NAME? error, check your spelling. Ensure you have typed SUMIFS correctly. In some older versions of Excel, the function is SUMIF, but it only supports a single condition. If you are using SUMIF with two criteria separated by an ampersand, ensure you have typed the ampersand correctly and placed your comparison operators in double quotes.

Frequently Asked Questions

Can I use SUMIF to sum between two dates?

Yes, you can. The process is identical to summing between numbers. You would use SUMIFS with two criteria ranges. The first criteria would check if the date is greater than or equal to your start date, and the second criteria would check if the date is less than or equal to your end date. This effectively sums all values that occurred within a specific date range.

What is the difference between SUMIF and SUMIFS?

The main difference is the number of criteria they can handle. SUMIF is designed for a single condition, such as summing values greater than 100. SUMIFS is designed for multiple conditions. SUMIFS is generally preferred for more complex calculations because it is more robust and easier to read when you need to check several different ranges.

Can I sum values between two text strings?

Yes, but it is less common. You would use the wildcard characters (* or ?) within your criteria arguments. For example, to sum values for items starting with "A" and ending with "e", your criteria would be "A*e". This allows you to create flexible pattern checks based on text data.

Why does my formula return #SPILL! or #VALUE!?

A #SPILL! error in Excel (specifically in dynamic array versions) usually means the formula cannot calculate because there is data blocking the result cells. A #VALUE! error usually means there is an issue with the data types, such as trying to sum text or dates where numbers are expected. Check your data for hidden characters or incompatible formats in your ranges.