Function Problems

Sum Values Between 3 and 21 in WPS Spreadsheets or Excel

Chanuka GeekiyanageChanuka Geekiyanage Nov 18, 2026 869 views

Question details

Sum values in column E when the corresponding values in column D are between 3 and 21, inclusive.

Sum Values When Another Column Is Between 3 and 21
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the result cell

Click an empty cell where you want the total to appear.

2
Enter the SUMIFS formula

Type =SUMIFS(E2:E25,D2:D25,">=3",D2:D25,"<=21") and press Enter.

3
Adjust the ranges if needed

In the formula bar, change E2:E25 and both D2:D25 references to cover your data, keeping all three ranges aligned.

Use SUMIFS with inclusive lower and upper limits
Both limits are included: The criteria ">=3" and "<=21" include rows where column D equals 3 or 21. If the result is unexpected, check whether values in column D are stored as text rather than numbers.
Calculate with WPS Spreadsheets

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. 1. Open your workbook: Open WPS Spreadsheets and select Open to choose your workbook.
  2. 2. Select an empty cell: Click the cell where you want the conditional total.
  3. 3. Enter the formula: Type =SUMIFS(E2:E25,D2:D25,">=3",D2:D25,"<=21") in the cell or formula bar.
  4. 4. Calculate the total: Press Enter, then adjust the row references in the formula bar if your data extends beyond row 25.
Apply lower and upper criteria in one SUMIFS formula.Open and save Microsoft Excel formats, including XLSX.Review and edit worksheet formulas in a familiar spreadsheet interface.
microsoft office alternative - wps office

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.