Calculation Issues

How to Sum Positive Values by Week Number in Excel

Nimra MalikNimra Malik Nov 11, 2026 869 views

Question details

The user needs to calculate the total of sales amounts for a specific week, ensuring that only values greater than zero are included in the sum.

How to Sum Positive Values by Week Number in Excel
Product
Excel
Device & OS
not provided
Scenario
Analyzing weekly sales data where the amounts are stored in column O, week numbers are in column R, and the target week is referenced in cell D24.
Observed behavior
The goal is to filter and calculate data simultaneously by applying two conditions: matching the specified week number and excluding zero or negative values.
Before you start

Ensure that your data ranges for the week numbers and sales amounts cover the exact same number of rows to avoid formula errors. Also, verify that your sales amounts are formatted as numbers, not text.

Solution 1Recommended

Using the SUMIFS Function

The SUMIFS function is the most efficient and recommended way to sum values based on multiple criteria, such as matching a week number and filtering for positive numbers.

SUMIFS allows you to specify multiple conditions across different ranges. In this scenario, the sales amount column is used twice: once as the primary range to sum, and again as a criteria range to check for values greater than zero.

1
Select the destination cell

Click on the cell where you want the final calculated total to appear.

2
Enter the SUMIFS formula

Type the formula: =SUMIFS(Sheet1!$O$5:$O$1000, Sheet1!$R$5:$R$1000, D24, Sheet1!$O$5:$O$1000, ">0")

3
Adjust the ranges

If your data extends beyond row 1000, replace the $5:$1000 portions with your actual data range boundaries.

4
Calculate the result

Press Enter to execute the formula and view the sum of positive values for the targeted week.

Using the SUMIFS Function
Formula Breakdown: The first argument is the sum range. The second and third arguments check for the week number matching cell D24. The fourth and fifth arguments ensure only amounts strictly greater than 0 are included in the sum.
Powerful Spreadsheet Calculator

Easily Calculate Multi-Condition Sums with WPS Spreadsheet

WPS Spreadsheet fully supports advanced logical and math functions like SUMIFS and SUMPRODUCT, allowing you to seamlessly analyze weekly sales data and perform multi-condition calculations without any lag.

  1. 1. Open your workbook: Launch WPS Office and open your Excel workbook containing the weekly sales data.
  2. 2. Locate the Formula tab: Select the cell for your result, then go to the 'Formulas' tab on the top ribbon.
  3. 3. Insert the SUMIFS function: Click 'Insert Function', search for 'SUMIFS', and click OK to open the function arguments dialog.
  4. 4. Input the criteria: Fill in the sum range and criteria fields as prompted by the dialog box, then click OK to calculate the positive sales sum.
Fully compatible with Microsoft Excel formulas, functions, and formats.Lightweight and fast, even when calculating datasets with hundreds of thousands of rows.Built-in formula error checking helps you quickly identify mismatched ranges.Free to use with a familiar, tabbed interface that requires no learning curve.
QA img-9

Frequently Asked Questions

Why does my SUMIFS formula return a #VALUE! error?

This error usually occurs when the sum range and the criteria ranges are not identically sized. Ensure that ranges like $O$5:$O$1000 and $R$5:$R$1000 cover the exact same number of rows and columns.

Can I reference the ">0" criteria from another cell instead of hardcoding it?

Yes. If you have the target value (e.g., 0) in cell E1, you can concatenate the logical operator with the cell reference by writing ">"&E1 in the criteria section of your SUMIFS formula.

How do I include zero values but exclude negative values?

To include exact zero values in your calculation, simply change the criteria argument in the formula from ">0" to ">=0".