Search code examples
excelmultiplication

Within rows multiplication Excel


I am in need of some help with multiplication in Excel. What I want to do is to multiply all the values in the cells of one column with the values of cells in another column.

Say I have a column A and a column B. In the cells A1...An of column A there are some values. Now I want the values of A1...An to be multiplied with the values I input in B1...Bn. In particular, I want what I input in A1 to be multiplied by what I input in B1, what I input in A2 by what I input in B2 and so on and so forth.

In the cell A1 I have the value ‘1’, say. In the cell A2 I have the value ‘2’. In the cells with which I want to multiply these values (cells B1 and B2) I have the formulae =0,4*A1 and =0,7*A2 (0,4 and 0,7 are just variables). Essentially, 1 and 2 are the amounts I have of an item, the price of which I have in the B cells (0,4 and 0,7). So I am multiplying the amount of an item with its price.

I hope my explanation makes sense.

Thanks in advance!


Solution

  • While you spend a lot of time explaining your data, you don't really explain what you want very well. It sounds to me like you want to multiply values in Column A with values in Column B and then ADD all of those results up. If this is true, then a sumproduct formula is what you want:

    =SUMPRODUCT(A1:An*B1:Bn)
    

    This will multiply each column, row by row, and add the results of those multiplications together.