SUMPRODUCT With Add, Subtract Workout
- 03:11
SUMPRODUCT with other operators workout.
Glossary
Add Array divide subtract SUMPRODUCTTranscript
This workout asks us to calculate the number of transactions. It firstly asks us to calculate it first, using the intermediate column i.e., the number of transactions column. Then it asks us to calculate it directly from the inputs using sumproduct, avoiding the intermediate step.
So here we have three rows of data. We've got total sales, and then the price per sale. We need to work out the number of transactions, so we can calculate that by taking the total sales divided by the price per sale.
I can then copy that down into each of these other transactions. Maybe we've got three transactions or three different divisions, and then I can sum them up. And my total number of transactions comes to 465.2. In each case, I had to divide total sales by price per sale.
Now, some products can do exactly the same thing. It asks me for array1, I select the total sales.
But normally at this step in sumproducts, I'd use a comma to multiply them. But instead, we can use the divide by symbol. And now I take array 2, close the brackets, and what it'll do, it'll take the first total sales of a 1,000 and divide by the price per sale of 10. Then do the same thing for the second line and the third, then sum them up and it should get us exactly the same number, 465.2 being the number of transactions. And that's what it gives us.
Let's see that in another workout. Underneath.
In this workouts, we're asked to calculate the profits, calculate it first, using the intermediate step profit column, then calculate it directly using sumproducts.
So I've got three transactions, or three divisions, or three projects. Each of them have sales and costs.
So to calculate my profits, I'll take the sales minus the costs.
I can then copy that down and sum them up. So my total profit comes to 3,400.
But sumproduct can do exactly the same thing. I'll take my sales as array q, but instead of pressing comma, I'll type in the minus sign. Then I'll put in array 2, close the brackets, and it will take the sales of 3,000, minus the cost of 2,000. Then do that for the second line and the third line, and sum them up to get us to 3,400.
So some product isn't just restricted to multiplying. You can also divide, subtract, and add.