RonZ
09-17-2010, 01:35 PM
Greetings all - thanks for all the past help and for letting me get as far as I have. I have spent some time browsing the KB, but have not seen anything like this in the past. If I missed it, sorry for the post - please direct me there....
I have a spreadsheet (attached) being driven off of pivot data where the user can select the months from B2 to view the data needed. The formula in cell B48 reads =B47/12/13 What this is doing, is taking the total from cell B47 and then dividing it by 12 shifts then dividing it by 13 individuals. This works famously if the user chooses only one month, but falls over if the user chooses two months because the formula cannot accommodate the additional 12 shifts for the second month. In other words, the corrected formula should read =B47/24/13 because there are now 24 shifts for 2 months of data. Similarly, if the user chooses any number of months, the script should count the number of months selected and multiply by 12. The result should be put into the middle position of the formula.
This issue occurs in parts of rows 48, 58, and 66.
Can anyone suggest a solution for this issue?
Thanks,
Ron
I have a spreadsheet (attached) being driven off of pivot data where the user can select the months from B2 to view the data needed. The formula in cell B48 reads =B47/12/13 What this is doing, is taking the total from cell B47 and then dividing it by 12 shifts then dividing it by 13 individuals. This works famously if the user chooses only one month, but falls over if the user chooses two months because the formula cannot accommodate the additional 12 shifts for the second month. In other words, the corrected formula should read =B47/24/13 because there are now 24 shifts for 2 months of data. Similarly, if the user chooses any number of months, the script should count the number of months selected and multiply by 12. The result should be put into the middle position of the formula.
This issue occurs in parts of rows 48, 58, and 66.
Can anyone suggest a solution for this issue?
Thanks,
Ron