Hello,

I have some population data listed by age:
70 300 000
71 290 000
72 280 000
73 265 000
74 250 000
75 230 000
76 205 000


And then I need to group the population by (flexible) age cohorts:
70-72, 73-75 or 70-74,75-79 or 70-79,80-89…

The population is not equally distributed and I need to compute the weighted average age in a given cohort.
Since the cohort span has to remain flexible (people can select the desired span in a cell), do you have an idea of which formula could help me?

Thanks a lot!
Best,
Marc