In Word 2000, it was easy to add up a column of numbers in a table. Just highlight the column, put the cursor in the cell under your column of numbers, hit the Formula button..and you get a total.
In Word 2007, it was very easy to press Insert Layout Formula (end of ribbon) and {= SUM(ABOVE } appeared.
However, when I try to get a total in the cell under my column, all I get is “syntax error”. Help!!
— Submitted by Trish from Sparks, Nevada
ANSWER:
The correct syntax for the formula is {=SUM(ABOVE)}. (The closing parentheses was missing in Trish’s forumula.) However, you cannot type the formula directly into the cell. It must be entered using a dialog box.
For the benefit of readers who don’t know how to use basic math calculations in Microsoft Word tables, let’s start at the beginning of the process.
Calculating a sum in a Microsoft Word table
To add a column of numbers in a table, follow these steps:
- Create a table with a column of numbers.
- Place the cursor in the cell where you want the sum displayed.
- On the Table Tools Layout tab (this tab is only visible if your cursor is inside the table), click Formula.
Click inside the table then click Formula on the Tables tab - Under Formula, type this formula exactly: =SUM(ABOVE)
Caution: Make sure there are no spaces between characters, and that ABOVE is inside (). There must be an opening AND closing bracket. You do not have to type the curly brackets; Word 2007 places the formula inside curly brackets for you when it inserts the formula into the table cell.Enter the formula in the dialog box - Select the desired number format.
- Click OK.
If the formula appears in the cell instead of the sum, press Alt + F9.
The sum formula works for adjacent cells. If your table contains blank cells, you need to add the cell names to the formula to make it work. You can also enter zero in the empty cell. (Thank-you for that tip, Desiree.)
In Excel, the cells have names such as D2 or H15. However, you may not realize that table cells in Word are named the same way. To find the name of a table cell, manually count the columns (A, B, C…) and the rows (1, 2, 3…).
If you are trying to add all of the numbers in the entire table, you have to use a range, as follows:
=SUM(A1:C39)
This will add all of the numbers in columns A, B, C, from cells 1-39.
One thing to check is that there are actually the number of rows and columns you think there are. If you have split/merged cells, it can be difficult to figure out the correct cell references.
Greg Maxey, Microsoft MVP, wrote a macro that reports the cell ranges. Here is the link to Greg’s article with the macro code.
Multiplying columns of numbers in a table
You can also multiply columns of numbers in a Word table. Follow the instructions for adding columns of numbers, but use the following formula, =PRODUCT(ABOVE).
Formulas can get quite complex. If you need more advanced math calculations, insert an Excel spreadsheet into your document instead of a Microsoft Word table.