Edit Mistakes in final formula. See post #15 below.
... dynamic tables the file is very large (68MB)
This caught my eye.
Just in case array formulas begin to slow the workbook down would you be interested in a (rather lengthy) non array approach?
This solution requires:- The source table to be sorted on Cod store.
(I inserted a sort key in a new column A in case you need to recover the original data order.) - A lookup table in K:M that returns the lower and upper row boundaries of each Cod store group.
Copy and paste the Cod stores in column K. Remove duplicates. Then in L2:M8 this formula to set the boundaries.
Then in H5:I32
Bookmarks