A pivot table can do this, see table at cell H5 of the
Grocery List-Sub Totals sheet. (The data in that list does not need to be in any special order.)
2024-09-27_124404.jpg
Select any date in the Date field, click on
Collapse Field and you have your spend summary for each day/month/year:
2024-09-27_124716.jpg
Do the same with a month field and you have your month/year summary:
2024-09-27_125201.jpg
If the source data on sheet
Original Grocery List changes the pivot table will need updating; either right-click somewhere in the pivot table and choose
Refresh
or
click on the
Refresh icon in the tool bar (it's just next to the
1 icon in the 2nd picture above) while a cell within the pivot is selected.
ps. I've just noticed that I got the
1 and
2 icons in the wrong places on the 2nd picture, they should be swapped (you wont see the
PivotTable Analyze toolbar unless you're in a Pivot first).