From a list of data I can easily calculate the average:
=AVERAGE (A1;A250)

Then when I filter the data to keep only a selection of lines I would like
the average to automatically update.

How should I proceed?

Thanks for the help