Function Problems

Multiply Values in Excel While Ignoring Zeros and Blanks

Emma BrownEmma Brown Nov 18, 2026 869 views

Question details

Multiply numeric values across a row while excluding zeros and blank cells.

Multiply Values in Excel While Ignoring Zeros and Blanks
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.
Before you start

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.

Solution 1Recommended

Use PRODUCT and FILTER in Excel 365 or Excel for the Web

Filter out zeros, blanks, and text before multiplying the remaining numbers.

1
Select a result cell

Click an empty cell outside the source range A1:H1.

2
Enter the formula

Type =PRODUCT(FILTER(A1:H1,ISNUMBER(A1:H1)*(A1:H1<>0),1)) in the formula bar and press Enter.

3
Adjust the range

Replace both occurrences of A1:H1 with your own row range, then copy the formula down if you need results for other rows.

Use PRODUCT and FILTER in Excel 365 or Excel for the Web
Negative values are included: A condition such as A1:H1>0 excludes negative numbers as well as zeros. Use it only if you want to multiply positive values.
WPS Spreadsheets

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. 1. Open your spreadsheet: Open WPS Spreadsheets and select File > Open to load your workbook.
  2. 2. Choose a result cell: Click an empty cell outside the row range you want to multiply.
  3. 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. 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.
Multiply positive and negative values without letting zeros affect the resultOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and a straightforward interfaceWork with spreadsheets for free
microsoft office alternative - wps office

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.