Sync your drop-down menus with table headers using this robust, auto-expanding Named Range trick.
LAMBDA defines the custom logic, and SCAN moves that logic through your data range.