My formula isn't written very neatly yet.
When you adjust the range of the table, you have to do that in 6 places. [Wherever it says 25 now].
Late tonight.I will upload a formula in which you only have to indicate the range of the table once.
If another member has not done so yet.