Insert subtotals in a list of data in a worksheet - Microsoft Support
You can automatically calculate subtotals and grand totals in a list for a column by using the Subtotal command. Important: Subtotals are not supported in Excel tables. The Subtotal command will appear grayed out if you are working with an Excel table.
Applies To:
Excel for Microsoft 365, Excel 2021, Excel 2019, Excel 2016, Excel 2013