This is a task that's obvious for humans, but difficult to explain to a computer. I can't think of an easy way to do it that doesn't involve changing the way the spreadsheet is arranged. Do you have any control over that? It would be simple if there were separate columns for the beer/wine name and the category, like this:
Local Beer - Swan
Local Beer - Emu Export
Imprt Beer - Heinken
Imprt Beer - Carlsberg
Local Wine - Mossworrd
Local Wine - Westfield
etc.
Sorry I couldn't be of more help. I'm thirsty now for some reason.
-Ben
Local Beer - Swan
Walter
In your example I noted that the Local beers and
wines etc headings were static, your Total Beers
was also in the same row and that the totals
for these had no heading.
If so then a simple Sumif formula will get the
results you need.
eg for Beer Totals
=SUMIF($A5:$A30,"<>",B5:B30)
What this is doing is looking up the range A5:A30
which could be the column range of your Beers as
the sub totals have nothing next to them then it skips
this and only adds the ones with something in them.
same deal with the Wine Totals;
=SUMIF($A33:$A58,"<>",B33:B58)
This assumes that the Beers are in Ranges given
and wines are in the ranges given.....from your
example they appear to be in a set range, the only
diff is some weeks the aree more or less beers.
HTH
Ivan