Forum Discussion
Fast calculation
There's a little known feature in Excel that is hard to explain,
where you can get a range of ranges by sheet (see my example it's just easier). This is easier to show in the attached spreadsheet (no macros). As you can see in the screen shot below, I have two sheets with green coloring called firstSheet and LastSheet, with several yellow worksheets in between.
What I can do from the CalcSheet (think summary or wherever you want to analyze), you can then conduct calculations on all these worksheets' same cell. In your case, you said all t-shirt sizes are in the same cell. For the sake of discussion let's assume it's cell C1.
I can then use ToCol to stack these and basically do whatever you want after this.
=LET(fullList,TOCOL(firstSheet:LastSheet!C1),fullList)
Thus in your particular case, if you were to just insert a firstsheet and lastsheet between your 100 worksheets (similar to the yellows...) and leverage formula like the following, but just updating C1 to be whatever cell has the keyvalue, you can then sum the result.
=LET(fullList,TOCOL(firstSheet:LastSheet!C1),mediumOnly,FILTER(fullList,fullList="M",0),ROWS(mediumOnly))
Here's a visual which might help if you can't
see file