I have a worksheet that contains 407 product codes for rows and a rolling 28 day calendar for the columns. Each cell within that table is a SUMIFS formula that looks up the product code and the date and returns the number of orders for that code on that day.
(Link to example picture) https://i.stack.imgur.com/DCEjv.jpg
I am trying to calculate a weighted average for the values within each product code. Meaning I'd like a cell to look at the last 28 day period and calculate a weighted average by finding the weight of each value automatically.
As an example, looking at code AC100, you'll notice there are a lot of days that there are 0's for. I'd like a cell to calculate the weighted average by looking up how many days were 0 and applying the appropriate weight to that value and so on and so on.
=AVERAGE(10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,15,15,15,15,30,30,30,30,). - Kyle