Use SUMIF with Offset Criteria and Sum Ranges in Excel
Question details
Determine whether SUMIF can test a value in one row and sum a value from the following row in another column.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user wants to check values in column B and sum corresponding values one row lower in column O.
- Observed behavior
- Each zero in the criteria range should cause the value in the next row of the sum column to be included.
Check that the criteria range and sum range contain the same number of cells, and confirm that the values to sum are one row below the values being tested.
Use SUMIF with a One-Row Offset in Excel
Use this formula when each matching value in column B corresponds to a value one row lower in column O.
In Excel, click an empty cell outside the ranges B8:B464 and O9:O465.
Type =SUMIF(B8:B464,0,O9:O465) in the cell or formula bar, then press Enter.
Verify that B8 is tested against O9, B9 against O10, and so on through B464 and O465.

Calculate Offset SUMIF Ranges in WPS Spreadsheets
Use the same SUMIF formula in WPS Spreadsheets to test one row and sum a value from the following row.
- 1. Open the workbook: Open WPS Spreadsheets and choose Open to select your Excel workbook.
- 2. Select a result cell: Click an empty cell outside the criteria and sum ranges.
- 3. Enter SUMIF: Type =SUMIF(B8:B464,0,O9:O465) and press Enter.
- 4. Verify the result: Check that zeros in column B correspond to values one row lower in column O, then use File > Save to save the workbook.

Frequently Asked Questions
Can the SUMIF criteria and sum ranges start on different rows?
Yes. For example, =SUMIF(B8:B464,0,O9:O465) tests B8 against O9, B9 against O10, and so on.
How many cells should each range contain?
Use the same number of cells in both ranges so the offset is clear. B8:B464 and O9:O465 each contain 457 cells.
How do I sum the value two rows below each match?
Move the sum range down another row while keeping its size equal to the criteria range. For example, use =SUMIF(B8:B464,0,O10:O466).
Can I use the same formula in WPS Spreadsheets?
Yes. Open the workbook in WPS Spreadsheets, select a result cell, and enter =SUMIF(B8:B464,0,O9:O465).




