cordial greetings
I am trying to obtain the sum of the number of males taking into account an age range that I set previously.
For example, I want to know how many males, between the ages of 3 and 12, there were in 2018. For this, I have proposed the following formula:
=SUM(SUMIF(B2:V2,{"Mens_3","Mens_4","Mens_5","Mens_6","Mens_7","Mens_8","Mens_9","Mens_10","Mens_11","Mens_12"},B3:V3))
One of the many problems I have is that this formula is quite long, and on the other hand, if I want to modify the age range, for example: men between 5 and 10 years old, I have to modify the criteria of the formula.
I have tried with the SUMPRODUCT function, but I did not succeed.
Could you please let me know if there is a simpler way to perform the calculation I require?
Thank you for your attention