Sum Values Between 3 and 21 in WPS Spreadsheets or Excel
Question details
Sum values in column E when the corresponding values in column D are between 3 and 21, inclusive.

- Product
- WPS Spreadsheets or Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet has criteria in column D and values to add in column E.
- Observed behavior
- The desired total includes only column E values from rows where column D is at least 3 and at most 21.
Check that columns D and E contain numeric values and that the ranges cover the same rows. The example below uses rows 2 through 25.
Use SUMIFS with inclusive lower and upper limits
Use this formula to add column E values for rows where column D is from 3 through 21.
Click an empty cell where you want the total to appear.
Type =SUMIFS(E2:E25,D2:D25,">=3",D2:D25,"<=21") and press Enter.
In the formula bar, change E2:E25 and both D2:D25 references to cover your data, keeping all three ranges aligned.

Sum a Range of Values in WPS Spreadsheets
Use SUMIFS in WPS Spreadsheets to add values only when a corresponding column meets both inclusive range conditions.
- 1. Open your workbook: Open WPS Spreadsheets and select Open to choose your workbook.
- 2. Select an empty cell: Click the cell where you want the conditional total.
- 3. Enter the formula: Type =SUMIFS(E2:E25,D2:D25,">=3",D2:D25,"<=21") in the cell or formula bar.
- 4. Calculate the total: Press Enter, then adjust the row references in the formula bar if your data extends beyond row 25.

Frequently Asked Questions
Does the formula include 3 and 21?
Yes. The criteria ">=3" and "<=21" include both 3 and 21. Use ">3" and "<21" instead to exclude the endpoints.
How do I change the rows included in the total?
Edit the formula in the formula bar and change E2:E25 and both D2:D25 references to the rows you need. Keep the ranges the same size and aligned.
Why might the SUMIFS result be unexpected?
Check that column D contains numbers rather than numbers stored as text, and that column E contains numeric values to sum. Also verify that the referenced ranges cover the intended rows.
Can I use this formula in Excel as well as WPS Spreadsheets?
Yes. Both support SUMIFS, so you can enter the same formula in an empty worksheet cell.




