Thanks for the answer, Lupp.
The problem stills even with your suggestion.
Making some test, it seems to me a problem with the function month(), since in the interval specified there are many empty dates in the “A” column, and the function month() applied to an empty cell returns the #value! error.
In the old release 126.96.36.199 and earlier this problem does not occur.
Maybe the simproduct() formula evaluates now ALL factors of the product, even if the first of them evaluates to 0 (H27:H3001=1 returns 0 or False in that case).
Usually for code optimization, in many programming languages. in a product operation the engine evaluates the factors in order from left to right, and when the first of them is 0 the evaluation stops, becouse we are shure that the result must be 0.
I suppose (but I can be wrong) that this does not happen in the newer releases of LO.
What about? Is there a workaround?