code function for weighted average

dennisli

Well-known Member
Good morning,
Right now I have one formula to get weighted average. If highlight this formula and hold and drag it to right, I can automatically to get each weighted average.
I tried to write function to express this formula in a simple way. Can you guys to help me to write a function code for this?
Thanks lot.
Dennis

Col A Col B

Year 12 24 36 48 60
1996 360 416 346 456 421
2002 400 500 430 230
2003 388 459 389
2004 390 466
2005 393
Weighted Average =SUM(C2:C6)/SUM(B2:OFFSET(B6,-B1/12,0))

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.
Hi,

Does not

=AVERAGE(B2:B6)

work?

It disregard blanks.

Replies
3
Views
1K
Replies
6
Views
220
Replies
3
Views
1K
Replies
3
Views
150
Replies
3
Views
191

Threads
1,207,438
Messages
6,078,564
Members
446,349
Latest member
Malroos7912

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

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