If the Subtotals command is grayed out, that’s because subtotals can’t be added to tables. But there’s a quick way around this. Convert your table to a range of data. Then you can add subtotals.
Just remember, converting to a range takes away the advantages of a table. Formatting, like colored rows, will remain, but things like filtering will be removed.
Right-click a cell in your table, point to Table, and then click Convert to Range.
Click Yes in the box that appears.
Add subtotals to your data
Now that you’ve removed the table functionality from your data, you can add your subtotals.
Click one of the cells containing your data.
Click Data > Subtotals.
In the Subtotals box, click OK.
Tips: Once you’ve added your subtotals, an outline graphic appears to the left of your data. You can click on the number buttons along the top of the graphic to expand and collapse the data.
Tip: If you decide you don’t want subtotals, you can remove them by clicking anywhere in the data, clicking Data > Subtotals, and then in the Subtotals box, click Remove All.