The ease at which one can tackle a task such as this is often determined by how the raw data is structured.
Whilst not wanting to go into the concept of normalisation (see link below) I suggest that you restructure how you save your raw data.
1NF, 2NF, 3NF and BCNF in Database Normalization | Studytonight
Each column should represent 'something' and the single row column header should identify what the column represents. Each colum header must be unique.
Each row should represent 'something' and ideally the first column value should represent what the row represents. I'm not sure what your rows represent.
What is in column A?
If you had a structure with the following column headers :
Date
CogSFACode
RowIdentificationID
then the structure would be long and thin, something which you should nearly always aim for in raw data.
It's well worth putting the effort in. It can then be filtered and sorted easily
You could then use some of the standard Excel functions such as SUMIF, SUMIFS and COUNTIF, COUNTIFS and the
reporting task will be made a lot easier.
Aiming for a long and thin report table is also a good idea. Having to scroll horizontally is always awkward.
Can you post the raw data in a workbook and include some data that identifies what the rows represent and I'll have a look at it tomorrow whilst I wait for
Corona Virus to go away!!! It may be that I can write some code to restructure the data.
Take care and be safe.