Sum If Between Two Values – Excel & Google Sheets

This tutorial will demonstrate how to use the SUMIFS Function to sum rows with data between two values in Excel and Google Sheets.

sum if between values Main Function

Sum if Between Numbers

The SUMIFS Function sums data rows that meet certain criteria. Its syntax is:

SUMIFS syntax

This example will sum the Revenue for all Order Numbers between (but not including) 525 and 528.

SUMIFS Between HardCoded

As you can see above, we use two logical tests as SUMIFS criteria:

  • “>525” represents “greater than 525”
  • “<528” represents “less than 528”

Note that when hard-coding criteria into the SUMIFS Function, the logical test must be within double quotes (“”).

If you wish to include the order numbers 525 and 528 in the formula, use the criteria:

Sum If Between Numbers – Cell References

Usually, it is bad practice to hard-code values into formulas. Instead, it is more flexible to use separate cells to define the criteria.

SUMIFS Between Reference

Now we add the logical operators within double quotes (“”)and use the & symbol to join the operator with the value:

If you want to include the order numbers 525 and 528 in the formula, use the criteria:

Locking Cell References

To make our formulas easier to read, we’ve shown the formulas without locked cell references:

But these formulas will not work properly when copy and pasted elsewhere in your file. Instead, you should use locked cell references like this:

Read our article on Locking Cell References to learn more.

Sum If Between Values in Google Sheets

These formulas work exactly the same in Google Sheets as in Excel.

sum if between values Google Function

Excel Practice Worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!