Hi,
See the attached.
The first point to make is that unless you restrict the output range to a specific range of cells you are always in danger of over-writing anything that is below your output range labels. That's why it's always a good idea to keep them away from any other data and the easiest way to do this is on an individual sheet. I've added the sheet called Output.
In the Output sheet I have named the range E1:F2 'crit_age' and A2:H9 'DataOut'
Your table on the first sheet already has a name called 'Table1'
When you click the button the following macro is run.
i.e this does automatically what you can manually do through the menu Data Advanced Filter.....
Change the criteria to see the different effects. currently with >21 and <25 it gives you four output rows.
Since it contains a macro it's a .xlsm file rather than just a .xlsx file so you may need to accept the warning about it containing macros when youj open it. Depends how your system is set up.
HTH
Bookmarks