# Calculate Weighted Average Of Prices For 12 Months

Jul 9, 2012
I wrote code that works just fine, however, I realized there were parts of the data I was using that had 0's in it for holiday.

Bottom line, this is code that calculated the weighted average of prices for 12 months (12 rows across) and Drows across. I'm trying to use the "do while is empty" approach but can't get the syntax to work. Here's the code

Code:

For r = 1 To drows

Totwavg = 0

Tothours = 0

priceavg = 0

For n = 1 To ncontracts

[Code] .....

View 1 Replies
ADVERTISEMENT
May 29, 2013

I am trying to calculate a weighted average and have used a sum product to do so. My problem is that the values decrease over time and I have done this in cells d13 and e13 and this seems to work ok. My problem is that I have many months so I don't want to use the formula this way as it will be very long. I tried to use sum and offset to try and effectively sum each row but this doesnt work.

Weighted Average

B

C

D

E

F

G

3

months

4

rate

original value

1

2

3

4

[Code] ...

View 4 Replies
View Related
Nov 23, 2009

I have 3 sets of data for two different groups:

Group 1 - Inbound

- Total volume

- Gross adds

- Win rate (gross adds/total volume)

Group 2 - Outbound

- Total volume

- Gross adds

- Win rate (gross adds/total volume)

I need to calculate the weighted average of the win rate based on volume of calls. Is there any way to do that?

View 6 Replies
View Related
Oct 14, 2009

I'm trying to make a formula that will calculate the average of the previous 12months. The goal is to tie the formula to a reference cell that contains a date. Each time the date is changed by a user the calculation will be updated accordingly. Here is the CSE formula that I thought would work:

{=AVERAGE(IF($B$5:$B$53=B$2,OFFSET($C$5,(COUNT(C5:$C$53)-1),0,12,1)))}

I've also attached a sample file to illustrate the problem. The 'range' portion ($C$5,(COUNT(C5:$C$53)-1)[/b]of the Offset function was setup simply to get the 12 months which preceeded the reference date.

View 4 Replies
View Related
Aug 1, 2012

Is it possible with 1 formula and avoid to create 300+ individual formulas.

The background info: each day we check the prices of bananas, sometimes we check 2, 3 or 4 times in the same day, and sometimes the price that is checked is the same, but most of the time the price is diferent throughout the day.

We need to know the average dayly price for a particular day, while taking in consideration that some days we have 3 diff prices, and some others we only have 2 or even just 1 price that was checked and thats the price for that day.

we have the following spreadsheet

Column A = Dates

Dates when a price was checked, note here that there might be days of the year when in a single day the price is checked 2 or 3 times, and sometimes the price is different on the same day.

Column B = Price

The price checked on the date indicated in column A

Column C = Daily Avg Price Date

is just a date range from 08/1/11 to 07/31/12, a single day on each cell, that is intended to be the day reference for column D. C1 = 8/1/11, C2 = 8/2/11, C3= 8/3/11 and so on until 7/31/12

Column D = Daily Avg Price

In this column we need to show the average daily price calculated from the prices and dates in columns A and B.

For example: when C1 equals 8/1/11, then D1 has to equal the average price for the product, taking in consideration the amount of prices annotated for that day in column A, with the prices of Column B for that day and providing the average price.

I could have had an easy =Average formula but, since sometimes we have 3 or 2 or 4 equal or different prices in one single day in column A, I dont have a constant for the data range for excel to calculate an average.

My only current solution is to go on each cell on column D and writing the average formula selecting the range that would apply for that average price. But that is taking so much time, and i have multiple other products and year ranges and markets that require this same answer.

View 6 Replies
View Related
Aug 29, 2006

I want to be able to calculate a price based on a given quantity. But here is the trick.

Example: Widget comes in cases of 12 at $1.00 per case. If the customer orders 36 widgets, then the cost is 36 x $1.00.

If item A is ordered in quantities less than "12" than there is a 15% upcharge.

Example: Widget comes in cases of 12 at $1.00 per case. If the customer orders 4 widgets then the price is 4 x $1.15

But, if the customer orders 35. Then the first 24 are calculated at 24 x $1.00 and the remaining 11 are calculated at 11 x $1.15.

View 14 Replies
View Related
Jul 25, 2007

I have a large dataset that includes information on the investment payout ratios of US companies over the period 2004-2006. I need to calculate the weighted average investment ratio for each company---see sample below

Microsoft Excel - example.xls ....

[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box

PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.

The corresponding weight for each year must be as follows: 0.5 for 2006, 0.3 for 2005 and 0.2 for 2004. Then, for company A, the weighted average will be: (0.5*B2)+(0.3*C2)+(0.1*D2) = 7.8 (see cell E2)

The problem is that for some companies there are missing data for some years. For example, for company B, there are no data available for year 2004. In this case , the weights have to change to 0.6 for 2006 and 0.4 for 2005. Then, the weighted average investment for company B will be (0.6*B3)+(0.4*C3) = 16 (see cell E3). Similarly, in cases when there are data for only 1 year , the weight has to change to 1. Then, for company C the weighted average is 35 (see cell E4)

Is there any formula to give me the weighted average as it appears in column E without having to adjust it for each single case?

View 9 Replies
View Related
Nov 10, 2009

I have a spreadsheet which basically looks like this

2, 5, 15, 20

2, 8, 12, 13

2, 7, 19, 46

F, 1, 10, 26

P, 1, 10, 39

P, 6, 22, 89

P, 7, 14, 46

P, 2, 11, 14

...

Column A is the key. If multiple rows have the same key, they're related.

The last column (DX on my spreadsheet) represents minutes participated, and is the weight variable. The middle columns are data that I'd like a weighted average for.

Here is the output I'm looking for given the above example:

2, 6.66, 16.83, 79

F, 1, 10, 26

P, 4.91, 16.73, 188

Column A remains the same, with one row for each key. The middle columns have their weighted average (where 6.66 = (5*20+8*13+7*46)/(20+13+46)), and the final column (DX) is the sum of minutes for all like keys.

View 9 Replies
View Related
Nov 16, 2009

I have long lists of data which has name of manufacturer, number of items and fault rates of items.

E.G

Manufacturer.......Number of Items......Fault Rate

Dell....................40000....................0.2%

Dell....................42200....................0.4%

Sharp.................303003..................0.1%

Microsoft.............312340..................0.04%

Dell....................3249321..................1%

Panasonic............300020...................2%

I need to find the weighted average of each manufacturers fault rate for just themselves, and also how the average of all the manufactueres would be if they weren't in it.

So for example for Dell I would need their weighted average of their three data entries and also then the weighted average of Sharp, Microsoft, Panasonic together.

I have been doing this by splitting the data into sections so for the example above I would do:

Manufacturer.......Number of Items......Fault Rate

Dell....................40000....................0.2%

Dell....................42200....................0.4%

Dell....................3249321..................1%

Panasonic............300020...................2%

Sharp.................303003..................0.1%

Microsoft.............312340..................0.04%

I would sum the Dell items, then sum the number of items excluding Dell then do two weighted average calculations giving me the ones that include then the ones that exclude Dell.

Then I would do...

Manufacturer.......Number of Items......Fault Rate

Sharp.................303003..................0.1%

Microsoft.............312340..................0.04%

Dell....................3249321..................1%

Dell....................40000....................0.2%

Dell....................42200....................0.4%

Panasonic............300020...................2%

And do the same process but with Sharp totals etc then move onto the next one.....

This example is with a very small data set so I'm sure you can see that this process is very time consuming, but I don't know any other way of doing it without splitting out the data first.

View 9 Replies
View Related
Nov 11, 2008

I am filling out an order form. My values are being entered as sizes. I would like to caculate any entery as 1 X the amount of the item, but the entry is for example.. "YS" and not the number 1.

View 4 Replies
View Related
Dec 5, 2007

with outputting a table with calculations based on the quantity that the user enters, and depending on that quantity, will calculate the price based on if he/she will receive the discount.

I think I should use an IF statement and calculate depending on if they receive the discount or not, but I don't know how to do that for one type of product code and not have to go manually put it in one by one.

I've attached a speadsheet to show how I should output the data. The prices will be listed in column E, with the prices depending on the quantity that the user will input with an input box and then if he/she qualifies for a discount.

View 5 Replies
View Related
Apr 20, 2009

I have two columns. One has cost (column A) and the other has profit (column B). I'd like to calculate the percentage profit as a function of how much something cost. So, if it cost $100 and the profit was $20 I would like to calculate 20%. For all percentages, I'd like to average them. I understand this is a "weighted average" and was able to get this working with this formula:

View 8 Replies
View Related
Dec 5, 2012

Ceate a formula for weighted averages according to criteria?

I want to know what was the average price I bought a product at on today's date. The average price needs to be weighted against the quantity of product sold.

View 3 Replies
View Related
Sep 9, 2012

Price

units

percent discount

weighted percent discount (1.0-2.0 price range)

1.32

100

[Code]...

So from the above example I would like to determine the weighted average for percent discount (weighted by units) by price range.

View 4 Replies
View Related
Dec 7, 2008

I am having trouble coming up with a formula to calculate the weighted average of students Finals grades. This is the format my sheet is in to give u an idea.

-----------------------------------------------------------------------

Test # 1 Test # 2Test #3Assignment #1Assignment #2Final Test Final MarkPossible Points:1001001001010100Percent Worth:20%20%20%5%5%30%Students:Anderson, Ken6473788768 ?Carter, Bill72768473.587 ?Dubeers, Ashley84887610590Jackson, Kevin7666549873Parker, Jerome82657679.560Remini, Leah969290101089Thompson, Chuck5042806.5760Vaughn, Sarah7265658970

----------------------------------------------------------------------- -

I have to come up with students averages based on the mark, the percent each grade is worth and the maximum amount of points its worth. Anyone know the formula or how to calculate the final grade using all of these factors?

View 9 Replies
View Related
Sep 4, 2009

If I wanted to calculate weighted average of a bunch of salespeople, is there a way to not include some values, such as ones below a certain value? I'm trying to so something like, what would my weighted average be if I didn't include my bottom 2 salespeople or my top 2 salespeople.

View 9 Replies
View Related
Jan 5, 2007

I have trouble finding the right formula for a weighted average price. The formula which i used in cell B2 of the attached file doesn't exclude irrelevant numbers. In the formula "= sumproduct(a5:a21;b5:b21)/sum(b5:b21)", i like to exclude cells B8, B9, B15, B19, B20 because the list prices are missing. How can i exclude these irrelevancies in the formula above?

View 3 Replies
View Related
Jul 25, 2007

Each individual enters 6 different qualifying numbers (columns) resulting in a "place" in each column. Placement in each of those columns is equal to the other columns or as important as the other. Is there a way to set up a formula to reflect each individuals "place" in each column and then have those columns weighted equally and averaged to determine the Winner?

View 9 Replies
View Related
Sep 28, 2007

I just got Excel 2007 and wanted to know what formula to use to calculate the weighted averages in the attached excel file.

View 6 Replies
View Related
Jan 4, 2008

I am in need of some more assistance regarding finding out a formula to find out the average grade of a pupil which ranges from letters 'A to E. This maybe be a simple task for experts, but unfortunatley spreadsheets are not my strong point. D7:D14 is the coloum that i wish to have an average of the grades acheived by each individual pupil in thier correspongin rows (on the right hand side of D7:D14) http://i41.photobucket.com/albums/e2...2/example2.jpg

View 5 Replies
View Related
Jun 6, 2014

What I am trying to do is rank my employees based on certain metrics. They are weighted in three different catagories. Talk time is 40%, Quality 50%, Attendance is 10%. I can weight the Talk Time and Quality, as those are basically the higher the score the better the weight. Attendance is the opposite, the lower the number, the higher the weight. Meaning, if employee has 1 absence that would better than someone who is at 4 absences. Is there a way to do this. I am somewhat educated on VBA, I understand if,then,else statements and/or Select/Case statements, so if I needed to do it in VBA I can. I just need direction to get it going.

View 3 Replies
View Related
Aug 25, 2009

I have a data set that looks something like the following:

TypeAmountCost

A100$50

A200$40

A300$35

B250$40

B275$55

B500$60

A700$20

B350$25

B450$35

C400$80

C400$60

I am having trouble creating a formula that would calculate the weighted average cost depending on the type (i.e. weighted average cost of $28.84 for A, weighted avg cost of $70 for C).

View 2 Replies
View Related
Jul 13, 2007

See attached picture. This shows Profit and Growth for the stores in each region.

The percentage total is weighted based on the profit of each store in the region.

What I have is an excel sheet with hundreds of regions (going down), all with a different amount of stores. I need a way to populate each of its Region % Total with the weighted average formula (in my example, cells C8, C12, and C20) while also varying the formula to include only the stores in the region.

For example, C8 calculates the weighted average for %s in rows 2 through 7 (6 stores), but C12 calculates it for rows 9 through 11 (3 stores). I need the formula to vary based on the number of stores.

View 9 Replies
View Related
Mar 1, 2012

I'm trying to calculate a weighted average gross margin but am having difficulty because I've instances of positive cost of sales and negative revenue. On a line by line basis I've had no problems calculating the margin but when it comes to calculating the weighted average margin as a whole I come unstuck. Looking at the data below (A1:D14) you can see that the margin should be somewhere between 90-99%.

Total RevenueCost of SalesGross ProfitGross Profit %4,805(449)4,35690.6%4,992(330)4,66293.4%3,467(246)3,22192.9%4,974(317)4,65893.6%3,873(130)3,74396.6

%3,756(258)3,49893.1%3,955(128)3,82796.8%2,872(59)2,81397.9%1,401(1)1,40099.9

%(10,987)21,45810,47195.3%3,042(172)2,87094.3%2,748(40)2,70998.6%2,682(172)2,51093.6%

View 4 Replies
View Related
Nov 25, 2006

I have done quite a bit of looking on Google and looked over the posts in this forum, however, I can't find an example Excel worksheet for a linear weighted moving average.

The data set I am applying this to has 180 data points and the linear weights should extend back over the last 30 points.

View 9 Replies
View Related
Feb 10, 2008

I have a spreadsheet with the following data that elapses an entire year, broken down into 24 hourly sections per day:

column A: hour of the day (from 0 to 23)

column B: vehicle group (separated into "Passenger", "SingleUnit", and "TractorTrailer")

column C: average speed for that vehicle group for the corresponding hour

column D: total volume/number of vehicles in that vehicle group for the corresponding hour

I would like to apply a weighted average to come up with a speed value for each hour (i.e. combine the average speeds for each of the 3 vehicle groups based on their relative volumes across the entire dataset).

My final table should show only:

Hour (from 0-23), Avg. Speed (containing the weighted averages from the dataset)

Attached is a screenshot example.

View 9 Replies
View Related
Jan 6, 2009

I'm trying to calculate a weighted average excluding the top and bottom value, and am having trouble creating a formula that can be dragged across.

my values are in E2:L17, and the weights are in M2:M17. Basically I want a weighted average of each column, using M2:M17 as the weights.

I'm sure someone's done something like this before, care to assist?

Example:

Data: 1, 2, 3, 4, 5

Weights: 3, 4, 5, 6, 7

Weighted avg ex hi/lo: (2x4+3x4+4x6)/3 = 44/3

View 9 Replies
View Related
Jan 22, 2009

The attachment is only a small portion of the data I need to analyse, but is representative of the full set of data. What I am trying to do is calculate a weighted average of each of the chemicals shown by location and machine usage and also still be able to use the filter or sort funtions. I have created a sample calculation in cell F9 to further explain this calculation.

I would like to be able to use the A-Z sorting icon in any of the columns, while still computing the weighted average of the respected chemicals. As it is now, the referenced cells just remain as the 6-7 cells above the calculation instead of the 6-7 cells that apply to the specific chemical at the location and machine (in this example - caustic at location1 on mch-03). For example, if I try to sort in column F, I'd still like to see my example calculation to reference the same values as it is now, calculating the same resulting 60.719.

View 3 Replies
View Related
Sep 22, 2006

how to do a weighted average with a text criteria. I have 3 columns and many rows. The first column has either "buy" or "sell". The thing is I need to find the weighted average based on the product of the other 2 columns for buy and sell separately e.g.:...............

View 5 Replies
View Related
Jan 11, 2007

I am looking for a formula that calculates the weighted average list price. In the attached file you'll find a formula which i've got through Ozgrid. The formula in cell I1 is: sumproduct((i4:i69)*(j4:j69))/sumproduct((j4:j69)*(i4:i69<>"")

That formula is perfect untill i filter data. For example:

The weighted value for the entire datasheet is 25.83%. After i made a filter selection on France the weighted value is still the same. How can i modify this formula so that it only calculates the weighted average for the selected records?

View 6 Replies
View Related