If each cell in column B represents the sum of X number of cells in column A. How do I get a variable in the formula to include more or less column A cells within each cell formula in column B.

The real world problem is stock prices in column A and the sum of between 1 and 30 of those contigent prices in column B. So cell B1 would include the sum of cells in the range between A1 and A30, depending on the value in C1. B2 would include the sum of between A2 and A31, all B cell ranges would depend on the value in C1.

Don't know how to configure the formula to let the value of the slider (C1) to chang the desired included range.

Thanks for the assistance,

Michael Slattery