https://www.exceltactics.com/make-filtered-list-sub-arrays-excel-using-small/5/
The above has a good example of displaying a filtered table based on certain criteria.