I've attached an example of spreadsheet I'm working on, the purpose of which is to create a forecast for staffing. Part of the process is to pull in existing history to get the average staffing change by month. I'm automating all the steps, as we have multiple workers needed to repeat this forecasting process on a monthly basis.
I'm stuck on what formula to put in Column H (the Average), and where to place it. Depending on what the user picks for their history, there could be anywhere from 3 to 12 different columns. The way the formulas would work would be like this (using row 3 as example):
3 months - =((D3-C3)+(E3-D3))/2 Formula in column G
4 months - =((D3-C3)+(E3-D3)+(F3-E3))/3 Formula in column H
5 months - =((D3-C3)+(E3-D3)+(F3-E3)+(G3-F3))/4 Formula in column I
6 months - =((D3-C3)+(E3-D3)+(F3-E3)+(G3-F3)+(H3-G3))/5 Formula in column J
Etc...
As well, the target destination for the formula would be moving depending on months fixed. My questions are these:
1) Is there a variable formula that I can use in place of apending the formula indicated above to get the average monthly change?
2) How can I make certain my Average column is always going to be the first column to the right of the Total column, no matter how many months are selected?
Thanks in advance for any help you can provide.
Bookmarks