I use a spreadsheet for budgeting and have individual sheets containing transactions for each year and another sheet categorising strings for my outgoings.
For example
A2=Food | B2=ALDI
etc.
A3=Food | B2=TESCO
A4=Utilities | B4=BRITISH GAS
Each of the values in the B column should partly match the string on my transactions sheet
A1=21/4/2020 | B1=42343 LIDL GB, LIDL, GB | C1=-21.50
What I’d like to do is count all the occurrences of, for example, LIDL and ALDI in a month under the category of ‘Food’ so I can say ‘x’ amount is spent of Food, Utilities, Eating Out etc.