Howdy,
Need some help from you smart young things.
I own a brewery, and I am doing some forward production planning. I have developed a model which looks at each of my tanks, and projected sales for each day of the year and it models when each tank will run dry and therefore when I need to brew some more beer, and into which tank, how much, which type etc.
What I want to be able to do is to set as a variable the number of days I look ahead in my sales forecasts to see when the tank will run dry. For example, if I am making a Pale Ale I might need to brew a new batch 14 days before the tank runs dry to give enough time for the beer to ferment properly, but for a Pilsner Lager I might want to look ahead 28 days because it needs a longer time.
I have the daily sales forecasts for the year in Column A. Presently if I want to look 14 days ahead I simply do a sum from today plus 14 days. The problem with this is that the "14" is fixed in the formula, and if I want to change it I must go in, change the formula, and copy it down etc..... there are about 10 places I need to change this so it is a pain in the arse.
My thought was to switch to R1C1 mode and then if I could reference the sum range as R[1]C[1]:R[15]C[1] or something like that. This is again easy if the 14 (15 is 14 plus 1) is fixed. What I need to do is R[1]C[1]:R[1+$B$16]:C[1] and then I can set B16 to 14, 21, 852 whatever and it will give me the sum of the correct number of cells, however this gives an error (of course I enter $b$16 in the correct R1C1 format).
Free beer to anyone who can help, you just need to come to Slovenia to pick it up
just as an example if I have the following daily sales
7
6
13
52
8
7
6
9
5
3
in another cell I have the number of days I want to count in this case say
5
then in the third cell I want the sum of the first 5 numbers. Then if I change the 5 to a 7 it gives the sum of the first 7 numbers.
cheers
Need some help from you smart young things.
I own a brewery, and I am doing some forward production planning. I have developed a model which looks at each of my tanks, and projected sales for each day of the year and it models when each tank will run dry and therefore when I need to brew some more beer, and into which tank, how much, which type etc.
What I want to be able to do is to set as a variable the number of days I look ahead in my sales forecasts to see when the tank will run dry. For example, if I am making a Pale Ale I might need to brew a new batch 14 days before the tank runs dry to give enough time for the beer to ferment properly, but for a Pilsner Lager I might want to look ahead 28 days because it needs a longer time.
I have the daily sales forecasts for the year in Column A. Presently if I want to look 14 days ahead I simply do a sum from today plus 14 days. The problem with this is that the "14" is fixed in the formula, and if I want to change it I must go in, change the formula, and copy it down etc..... there are about 10 places I need to change this so it is a pain in the arse.
My thought was to switch to R1C1 mode and then if I could reference the sum range as R[1]C[1]:R[15]C[1] or something like that. This is again easy if the 14 (15 is 14 plus 1) is fixed. What I need to do is R[1]C[1]:R[1+$B$16]:C[1] and then I can set B16 to 14, 21, 852 whatever and it will give me the sum of the correct number of cells, however this gives an error (of course I enter $b$16 in the correct R1C1 format).
Free beer to anyone who can help, you just need to come to Slovenia to pick it up

just as an example if I have the following daily sales
7
6
13
52
8
7
6
9
5
3
in another cell I have the number of days I want to count in this case say
5
then in the third cell I want the sum of the first 5 numbers. Then if I change the 5 to a 7 it gives the sum of the first 7 numbers.
cheers



