See this video which explains all in 30 seconds.
I have been given a sheet and asked if I can replicate the functionality.
Specifically, there is a total line in a sheet.
When I drag the details lines to expand the range then the total also moves down.
The video explains it best.
How do I achieve this?