First, you need to include also include column T in row 71.
Secondly, the generic formula I provided filters out columns that should not be filtered out because your actual data is much different than your previous data provided.
For example, X16 gets filtered out because the column sums to zero, so the formual is doing something here that it shouldn't be doing.
As I don't know how your actual data might morph, it's hard to come up with a correct filtering for all situations.
Best if you figure out or explain in which situations rows and columns need to be included and when not.
In your dataset
gives a correct result.
So you just need to select the correct data for the function.
Bookmarks