The attached may not work for your version of Excel (What is it?)
There's a slicer, all code has been removed (not needed).
You can make month selections as you do say in File Explorer;
clicking on one month, holding the Shift key then clicking another will select all months inbetween.
clicking on the will select all months,
clicking on a month while holding the Ctrl key will alternately select/deselect just that month.