Multiplying Cells With Values in Excel: 3 Examples

The following dataset contains sales across a small company for the first 5 days of each month; however, not every day of every month recorded sales. Suppose we want to multiply those sales that were recorded to determine total revenue so that our company can see how well it’s doing, given that number of sales is an important indicator of its health: for example, determining the effectiveness of marketing initiatives, assessing efforts made by sales personnel, and identifying ideal locations for new stores.

3 Different Examples If Cell Contains Value Then Multiply Using Excel Formula


Example 1. Apply the PRODUCT Function to All Cells With Values

The PRODUCT function multiples large amounts of information quickly, in this case all values provided as arguments. It is particularly handy when dealing with multiple cells Its  mathematical operator (*) can also be used to execute the same action, except it cannot handle empty cells (i.e. without value) and give an error. In other words, this function multiplies all cells that contain value and automatically ignores any cell which does not. .

Let’s return to our example, to which we have added a fourth column. The dataset indicates sales in January in column B, sales in February in column C and sales in March in column D. The PRODUCT function goes in column E.

STEPS:

  • Select E5 and enter the following formula:
=PRODUCT(B5,C5,D5)
  • Press Enter.

Note that only those cells with values have been multiplied, i.e. as only B5 and D5 contain values and C5 does not, only B4 and D5 have been multiplied and that the result (as well as the formula in the formula bar) appears in E5.

Apply PRODUCT Function to Multiply If Cell Contains Value

  • To duplicate the formula, click and drag the Fill Handle down the targeted range OR double-click the Plus (+) sign to AutoFill.

Apply PRODUCT Function to Multiply If Cell Contains Value

We now know the total number of sales between January and March.

Read More: How to Create a Multiplication Formula in Excel


Example 2. Apply the IF Function to Cells Containing a Value

The IF Function is among Excel’s most commonly used, allowing you to create logical comparisons between a given number and a choice of two conditions: True or False.

As before, our example contains three columns of data and a fourth for results.

Excel Formula with IF Function to Multiply Only Value Containing Cells

STEPS:

  • Select E5 and enter the following formula:
=IF(B5="",1,B5) * IF(C5="",1,C5) * IF(D5="",1,D5)*IF(B5&C5&D5="",0,1)
  • Press Enter.

Excel Formula with IF Function to Multiply Only Value Containing Cells

Note that only those cells with values have been multiplied, i.e. since only B5 and D5 contain values and C5 does not, only B4 and D5 have been multiplied; and that the result (as well as the formula in the formula bar) appear in E5.

  • To duplicate the formula, click and drag the Fill Handle down the targeted range OR double-click the Plus (+) sign to AutoFill.

How Does the Formula Work?

  • IF(B5=””,1,B5) * IF(C5=””,1,C5) * IF(D5=””,1,D5) determines whether a given cell is empty; if so, the result is False (where False is represented by the double quotation marks)

→ OUTPUT: 22*1*25 = 550

  • IF(B5&C5&D5=””,0,1) determines whether a given cell contains a number; if so, the result is True (where True is represented by 1).

→ OUTPUT: 1

  • Together, IF(B5=””,1,B5) * IF(C5=””,1,C5) * IF(D5=””,1,D5)*IF(B5&C5&D5=””,0,1) reveals the total number of sales over the three-month period.

→ OUTPUT: 550*1 =550

Read More: How to Make Multiplication Table in Excel


Example 3. Combine IF and ISBLANK Functions to Cells Containing a Value

ISBLANK is used to determine whether or not a cell is empty: if so, the result is TRUE; if not, the result is FALSE. As the dataset indicates there were no sales in February, combining IF and ISBLANK removes those cells from the calculation and multiplies those that remain.

Here too, our example contains three columns of data and a fourth for results.

STEPS:

  • Select E5 and enter the following formula:
=IF(ISBLANK(C5), 1, C5)*B5*D5
  • Press Enter.

Combine IF and ISBLANK Functions to Multiply Cell That Contains Value

Note that only those cells with values have been multiplied, i.e. as only B5 and D5 contain values and C5 does not, only B4 and D5 have been multiplied; the result appears in E5.

  • To duplicate the formula, click and drag the Fill Handle down the targeted range OR double-click the Plus (+) sign to AutoFill.

How Does It Work?

  • ISBLANK(C5), 1, C5) determines whether or not the cell is blank; if True, then OUTPUT is 1

→ OUTPUT: 1

  • IF(ISBLANK(C5), 1, C5)*B5*D5 multiplies cells containing a value, i.e. OUTPUT is 1*550 = 550

→ OUTPUT: 1*550 = 550


Download Free Practice Workbook


Related Articles


<< Go Back to Multiply in Excel | Calculate in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Sabrina Ayon
Sabrina Ayon

Sabrina Ayon, a Computer Science and Engineering graduate from United International University, has been an integral part of the ExcelDemy project for two years. She authored 150+ articles, excelling in instructing through visually engaging Excel tutorials. With a passion for teaching, Sabrina conducted sessions on Excel VBA, sharing her knowledge and insights with others. Currently holding the position of Project Manager for the ExcelDemy Visual Development Project, she oversees various aspects of the project, ensuring its smooth operation... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo