....whereby Row197 represents a flipped input, and Row 192 equals the month in my timeline.

The formula works successfully and does what it is supposed to do. However because of the length of the sumproduct (i.e from column M to GJ) and the number of rows (this goes down a few '000 rows) my spreadsheet is enormous (100mb). Also it takes some time to recalculate.

I was wondering if anyone could think of an alternative formula, perhaps using dynamic range names, which would eliminate the need for so many SUMPRODUCTS, or at least speed up my spreadsheet?

Well spotted. There is an IF formula just before it which basically looks at a switch as to whether to bother with this calculation or not - you can forget it about for now. This is the TRUE part of that IF statement.

Cohort V$12:V12 is dynamic in that if you drag the cells to the right, it will extend all the way to V$12:GT12. This range is then multiplied within the SUMPRODUCT by the OFFSET part of the formula.

This formula is also dragged down a few thousand rows so as you can see I have got a lot of SUMPRODUCTs going on causing my s'sheet to run very slowly and get very large.

I was thinking it could be done by having a dynamic range for the COHORT part and the OFFSET part by I'm not sure whether this can a) be done or b) how one goes about it if one can?

As for M192, this is just the number of the month that my timeline refers to. I.E M192 is month 1, M193 is month 2 (although "month" isn't actually written, just the number). Hope that helps a little....I appreciate it is hard to explain what I'm trying to do...

However, the file size hasn't reduced mainly because of the range of the SUMPRODUCT (i.e. the range it is looking at is stretching from A to GJ).

One of the pieces of information that I omitted to tell you was that this formula is actually copied down in blocks of three (i.e. same formula for c.1000 lines down, then a new block with the same formula 1000 lines down etc). The only difference between the three blocks is that they refer to different periods of time - i.e Periods A is 10 months long, B 50 months and C, 24 months). The length of these periods is changeable though depending on what is input.

What I'm wondering is, would it be possible to get the SUMPRODUCT to work with a range that only goes as far as is needed depending on the length of the period set? This way, my SUMPRODUCT would only look at a range of 10 months in Period A and not the full 84 periods (which would hopefully reduce my file size?). I imagine it will need an OFFSET formula within the SUMPRODUCT, which whilst it would increase volatility, would bring file size/calculation speed down which is what I'm hoping ultimately to acheive.

If you were able to write a formula that does all that I would be very grateful, however I realise you answered the question I originally asked so happy to award the points on that basis.

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents. The steps to find the Templates folder path are …

Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210 (2 * 3 * 5 * 7) or 2310 (2 * 3 * 5 * 7 * 11).
The larger templa…