Pivot tables have a bit of a learning curve but you can also use them to dynamically pull data out of sheets: https://support.google.com/docs/answer/1272900?hl=en&co=GENI...