It is a bit complicated to describe in words, but I am making a literature review and I need to map how often certain theories are used within certain themes or topics. I currently have a table like this in Excel:

And I would like to rearrange my data, so each column represent a theme and each row represent a theory, while the matrix is showing a count of how many times a specific theory occurs within a certain theme (sorry, I should probably have filled some numbers into the table to illustrate counting the theories).

My best bet is that I should do some sort of "conditional counting" and count theories if and only if there is also a cross in a certain theme, but I can't really figure out how to do this in practice.

I have also included the original excel-file, so you can play around with it: Excel file