In Excel, adding a table with two total rows—one for subtotals (per category) and another for grand totals—simplifies complex data analysis. You can achieve this with built-in functions or custom formatting, but the simplest method relies on using the Table Total row feature combined with manual adjustments. Here’s how to do it right.
What You'll Need
- An existing Excel table (created with
Ctrl+Tor the Insert > Table button) - Excel 2013 or later (the feature changed significantly in 2019+)
- Basic familiarity with sorting and filtering in tables
- A second row of data (for the grand totals) aligned with the bottom of your original table
Step-by-Step
-
Start with a table.
Convert your data range into an Excel table. Select your data (including headers), then press
Ctrl+T(Windows) orCmd+T(Mac). If your table already exists, ensure it’s active—click anywhere inside it to show table tools on the ribbon. Labels may differ slightly by Excel version (2013 vs. 2019 vs. 365) or region. In older versions, the "Table Tools" ribbon may appear in two sections (Design and Format). -
Add a subtotal row.
Select the entire table (click the table selection handle in the top-left corner of the table).
Go to the Table Design tab (first ribbon section). In the Totals group, click the dropdown arrow next to
row totals. ChooseSubtotalfrom the list. Excel will automatically generate a row at the bottom with subtotal formulas (e.g., SUM, COUNT, AVG) for each column. If you want to exclude certain columns from subtotaling, clickSubtotalagain, then select which columns to include. In Excel 2016 or earlier, the subtotal dropdown may be labeled differently (e.g., "Row Totals" with an arrow). -
Add a grand total row.
To create a second total row (e.g., for all rows combined), manually duplicate the bottom row of your table and adjust the formulas.
- Copy the entire bottom row (click the row number in the left margin, then press
Ctrl+C). - Click the cell below the subtotal row (e.g., cell A1 of the duplicated row). Paste using
Ctrl+Shift+V(to keep formulas intact) orCtrl+Alt+V> "Paste Special" >Values. Paste only the values (not formulas). - In the first cell of the new row (e.g., A1 of the duplicated row), enter
=SUM(A2:A1000)(adjust the range to match your table). If you have headers, use=SUM(A2:A1000)—Excel will automatically adjust. - Drag the fill handle (small black box in the bottom-right corner of the first cell of the new row) down to copy the formula to all columns.
=SUMIF(range, criteria, sum_range)to avoid hardcoding row numbers. - Copy the entire bottom row (click the row number in the left margin, then press
-
Format the grand total row.
Right-click the new row and select Format Table Row. Choose
Totalfrom the dropdown. Excel will apply bold borders and a slightly darker fill to distinguish it from subtotals. If formatting doesn’t apply, manually add borders: Select the row, go to Home tab > Borders >Outlineto thicken top/bottom borders. -
Test your totals.
Add or remove rows in your table. Check that both rows update correctly. If subtotals misbehave, try:
- Recreating the table as a new range (Ctrl+Shift+Home > Ctrl+T).
- Updating the table structure (right-click table > Table Tools > Convert to Range > Convert > Table).
=SUMIFSinstead.
Common Mistakes
- Forgetting to select the table. Always click inside the table before adding totals. If you select only a column, Excel may generate row totals for that column alone.
- Hardcoding row positions. Formulas like
=SUM(A2:A1000)fail if you add/remove rows. Use relative references (A2:A$1000) or dynamic ranges. - Skipping subtotal column selection. If you don’t choose which columns to subtotal, Excel may apply formulas to all columns, including headers or blank cells.
- Ignoring table boundaries. If your data spans multiple sheets or includes hidden rows, formulas may reference out-of-bounds cells. Use
SUMIFwith explicit ranges.
Tips
- Use conditional formatting. Highlight grand totals above a threshold (e.g.,
=SUM(A2:A1000)>500) by formatting the row with Home > Conditional Formatting >New Rule>Use a formula.... - Export to Power Query. For larger datasets, import data into Power Query, apply subtotals, then duplicate a measure row for grand totals. Use
Custom Columnto calculate sums. - Avoid nested subtotals. If you need hierarchical totals (e.g., regional > department), use
PivotTablesinstead of row totals. - Test with sample data. Create a test table with 10 rows to verify formulas before applying to real data. Use
=SUM(A:A)in a blank cell to check totals match.
Troubleshooting
-
Subtotals show incorrect values.
- Recreate the table as a new range (Ctrl+Shift+Home > Ctrl+T).
- Update the table structure (right-click > Table Tools > Convert to Range > Convert > Table).
- Check for hidden rows—Excel may include them in calculations. Use
Ctrl+Shift+Hto show/hide.
-
Grand totals don’t update.
- Right-click the grand total row > Format Table Row >
Totaland try again. - Use dynamic formulas: Replace
=SUM(A2:A1000)with=SUMIF('Sheet1'!$A$2:$A$1000, "<>")(adjust range and criteria).
- Right-click the grand total row > Format Table Row >
-
Formulas reference the wrong row.
If Excel shows
A1000as the last row, your table may not be correctly formatted. Ensure the table includes all data with no extra blank rows above or below. -
Excel freezes when adding totals.
Close other Excel applications, update to the latest version, or restart your PC. If the issue persists, try:
- Repair Excel: Go to File > Account >
Change the Excel option settings provided by Microsoft> Repair. - Reset table settings: Delete the table, recreate it, and add totals again.
- Repair Excel: Go to File > Account >
Frequently Asked Questions
Why won’t Excel add two separate total rows?
Excel’s built-in table feature only supports one row of totals per table. To add a second row (e.g., grand totals), you must manually duplicate the row and adjust formulas, as shown in Step 3.
Can I use conditional logic in the grand total row?
Yes, but only if you use formulas like =IF(SUM(A2:A1000)>1000, "High", "Low") in the grand total row. Excel cannot dynamically apply conditional formatting to the row itself unless you pre-format individual cells.
What if my table has more than 1,000 rows?
Instead of hardcoding A1000, use relative references like A2:A$1000 or dynamic ranges. For very large tables, consider Power Query or a named range.
How do I remove the subtotal row?
Select your table, go to Table Design > Totals > Clear to remove the row. To manually delete the grand total row, select it and press Delete.
Can I apply totals to a table without headers?
No. Excel requires headers in the first row to generate subtotals. If your table lacks headers, add them before applying totals.
Why does Excel split the grand total row across columns?
This happens if the table’s rows are wider than the sheet. Resize the table to fit all columns, or use conditional formatting to align the row properly.