Hi,
I do not see the point to not let first cumulate data and then do selection normal way, but if you for some reason want to play with it - why not.
See attached file. In Out sheet there is one helper column D (which could be included in main formulas, but they are anyway rather long, so I decided to leave it there). There are formulas like
the spreadsheet will work quicker if you do reasonable limiting of ranges like:
or similar. (It will be especially impotrant in last formula.)
in B2 rather simple array formula* and copy down:
In A2 and copied down rather long one (and again array formula):
With this one limiting of scopes from A:A to say A1:A100 (here I'd recommend using A1, not A2, even if row 1 is with headers) would result in nice speed gain.
*)...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
Bookmarks