When attempting to insert a subtotal, either a single or by selection, you are unable to as they are ghosted or greyed out.
Subtotals can only be inserted into a worksheet if you have Subtotals set to be visible. Go to the View tab, Rows, and Verify Subtotals are enabled.
Note: Subtotals are enabled if it has a highlighted background around the icon.