How to Use the PRODUCT function to multiply conditional values
In this example, values are listed in columns A and B. Excel should calculate the product of each value in a row but only if both values exist. If one value is missing, the result is an empty cell, as shown in column C. To get the desired results, use the PRODUCT function in combination with the IF and OR functions as described
below.
To multiply conditional values:
- In cells A2:A10 enter some numbers for value 1.
- In cells B2:B10 enter some numbers for value 2.
- Select cells C2:C10 and type the following formula: =IF(OR(A2=”",B2=”"),”",PRODUCT(A2,B2)).
- Press Ctrl+Enter.
The following formula produces the same result: =IF(OR(A2=”",B2=”"),”", A2 * B2).
This tip is compatible with Excel 97, 2000, 2003 and 2007.
- How to Use the PRODUCT function to multiply values in Excel
- Use the SUMPRODUCT function to multiply and sum at once
- Use the QUOTIENT function to return the integer portion of a division
- Conditional Average formula that ignores empty cells in Excel
- Use the FLOOR function to round down values to the nearest 100
