Multiply Values in Excel While Ignoring Zeros and Blanks
Question details
Multiply numeric values across a row while excluding zeros and blank cells.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A row contains numbers, zeros, and blanks, and the user needs the product of its nonzero values.
- Observed behavior
- The desired result includes positive and negative numbers but excludes zeros and blanks.
Identify the row range to multiply and check whether your Excel version supports FILTER. The formulas below use A1:H1 and return 1 when the range has no nonzero numeric values.
Use PRODUCT and FILTER in Excel 365 or Excel for the Web
Filter out zeros, blanks, and text before multiplying the remaining numbers.
Click an empty cell outside the source range A1:H1.
Type =PRODUCT(FILTER(A1:H1,ISNUMBER(A1:H1)*(A1:H1<>0),1)) in the formula bar and press Enter.
Replace both occurrences of A1:H1 with your own row range, then copy the formula down if you need results for other rows.

Use an Array Formula in Older Excel Versions
Use PRODUCT with IF when FILTER is unavailable.
Multiply Nonzero Values in WPS Spreadsheets
Use a PRODUCT and IF array formula in WPS Spreadsheets to multiply nonzero numbers across a row while skipping blanks and text.
- 1. Open your spreadsheet: Open WPS Spreadsheets and select File > Open to load your workbook.
- 2. Choose a result cell: Click an empty cell outside the row range you want to multiply.
- 3. Enter the formula: In the formula bar, type =PRODUCT(IF(ISNUMBER(A1:H1)*(A1:H1<>0),A1:H1,1)), replacing A1:H1 with your range.
- 4. Confirm and check: Confirm the formula as an array formula; on Windows, press Ctrl+Shift+Enter. Check the result against the nonzero numbers in the row.

Frequently Asked Questions
Will these formulas multiply negative numbers?
Yes. The condition A1:H1<>0 includes negative numbers. Using A1:H1>0 instead includes only positive values.
What happens if every cell in the range is blank or zero?
The formulas return 1, the multiplicative identity. The FILTER formula supplies 1 when no values match, and the array formula substitutes 1 for excluded cells.
Why do I need Ctrl+Shift+Enter?
Older Excel versions require Ctrl+Shift+Enter on Windows to evaluate the IF formula across the range as an array. Excel 365 generally accepts the formula with Enter.
Do the formulas ignore text in the row?
Yes. ISNUMBER selects numeric values, so ordinary text is excluded. If a source cell contains an error, resolve that error before calculating.




