Formula: Weighted Average

Alejandro Rodriguez

New Member
Joined
Jul 19, 2005
Messages
40
.
Hello,

I need a formula to calculate the unit cost based on the weighted average method.

I enclose an example with the results required (column color yellow).
(Unit Cost)

Appreciate any help.



Excel 2003
ABCDE
1
2RESULT
3REQUIRED
4
5PRICEINOUTBALANCEUNIT COST
615.0010010015.00
7505015.00
820.0020025019.00
92005019.00
10302019.00
1110.001,0001,02010.18
1218.002001,22011.46
13701,15011.46
141501,00011.46
1530.004001,40016.76
162001,20016.76
1750070016.76
1835035016.76
1919.0030065017.79
206059017.79
2122.005064018.12
22
stock
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Formula in E6 copied down:


Excel 2010
ABCDE
1
2RESULT
3REQUIRED
4
5PRICEINOUTBALANCEUNIT COST
61510010015
7505015
82020025019
92005019
10302019
11101,0001,02010.18
12182001,22011.46
13701,15011.46
141501,00011.46
15304001,40016.76
162001,20016.76
1750070016.76
1835035016.76
191930065017.79
206059017.79
21225064018.12
Sheet1
Cell Formulas
RangeFormula
E6=ROUND(IF(ISNUMBER(A6),((A6*B6)+IF(ISNUMBER(D5),(D5*E5),0))/D6,E5),2)
 
Upvote 0
.
Thank you, Andrew.
The formula works very well. Thank you.

One question. Just for curiosity.
It could be a way to not include cell E5 in your formula?
If not or impossible, no problem.

Again, I highly appreciate your help.
.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top