# Formula Question

#### jdude

##### New Member
I have an inventory sheet which includes weekly Purchases and I am looking for a way to add the units purchased for each week...then multiply that total by the purchase price and keep a running total for all items in the list.

Example:

Week1 Week2 Week3 Week4 Week5 Purchase Price Total Purchases
3 1 2 2 2 \$20 \$830
1 6 5 3 3 \$35

I need the formula to add the weekly purchases then multiply by the linear purchase price for each row while keeping a running total.

I am stuck here so any help would be greatly appreciated!!

### Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

#### gaz_chops

##### Well-known Member
Not clear from your example what result you want?

#### gaz_chops

##### Well-known Member
Is it like this?

Code:
``````[TABLE="width: 488"]
<colgroup><col span="5"><col><col></colgroup><tbody>[TR]
[TD]Week1[/TD]
[TD]Week2[/TD]
[TD]Week3[/TD]
[TD]Week4[/TD]
[TD]Week5[/TD]
[TD]Purchase Price[/TD]
[TD]Total Purchases[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]2560[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]35[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]50[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]10[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]45[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]``````

#### jdude

##### New Member
I was able to figure it out!
=SUMPRODUCT(E8:E703,H8:H703)+SUMPRODUCT(E8:E703,I8:I703)+SUMPRODUCT(E8:E703,J8:J703)+SUMPRODUCT(E8:E703,K8:K703)+SUMPRODUCT(E8:E703,L8:L703)

I just had to simplify my train of thought.

#### gaz_chops

##### Well-known Member
Was my example correct?

If so then try

=SUMPRODUCT((A2:E10)*(F2:F10))

Replies
2
Views
88
Replies
1
Views
537
Replies
1
Views
58
Replies
31
Views
351
Replies
1
Views
93

1,195,858
Messages
6,011,979
Members
441,661
Latest member
Pammie007

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back