How to Use Word Table Formulas to Summarize Data from Another Table
Question details
The user wants to summarize data by counting specific text values (such as 'good' or 'bad' conditions) from a detailed Word table and displaying the calculated totals in a separate summary table.

- Product
- Word Processing
- Device & OS
- not provided
- Scenario
- Attempting to count text string occurrences within one table and dynamically displaying those summary totals in another table within the same document.
- Observed behavior
- Word table formulas lack advanced features like Excel's COUNTIF for text strings. Cross-table referencing is not straightforward and requires manual numerical workarounds and bookmarks.
Before attempting complex formulas in a text document, evaluate whether your data requires frequent updates. Word table formulas and bookmarks can be fragile during standard text editing.
Use Numeric Workarounds and Bookmarks for Cross-Table Formulas
Since text counting is restricted in standard document tables, you can assign numeric values to text conditions and use bookmarks to reference these totals in your summary table.
Document table formulas are significantly less sophisticated than dedicated spreadsheet formulas. To tally states like 'Good' and 'Bad', you must convert these conditions into numbers (e.g., 1 for Good, 0 for Bad) and calculate the sums.
In your source table, replace text-based conditions with numeric equivalents. For example, enter '1' for items in good condition and '0' for items in bad condition.
Add a formula row at the bottom of the source table. Use the formula =COUNT(ABOVE)-1 to calculate total items, and =SUM(ABOVE) to calculate the sum of 'Good' items.
Select the calculated total number, navigate to the 'Insert' tab, click 'Bookmark', and name it (e.g., 'Total_Items'). Repeat this step for the 'Good' sum, naming it (e.g., 'Good_Items').
Click inside your summary table where you want the result. Press Ctrl+F9 to insert field braces. Inside the braces, type =Good_Items to display the good count. For the bad count, insert another field and type =Total_Items - Good_Items.
Press F9 to update the fields and calculate the final results. You can press Alt+F9 at any time to toggle between viewing the field codes and the calculated numbers.

Embed a Spreadsheet Component for Complex Calculations
If your document requires complex counting functions or text evaluation, embedding an actual spreadsheet object is a much more robust and reliable method.
Handle Table Data Easily with WPS Office
WPS Office provides seamless integration between its Writer and Spreadsheet applications. You can easily embed fully functional spreadsheets into your text documents to handle complex formulas and cross-table summaries without relying on fragile bookmarks.
- 1. Open WPS Writer: Launch WPS Office and open your text document in the WPS Writer application.
- 2. Insert a Spreadsheet Object: Go to the 'Insert' tab on the top ribbon, click 'Object', and choose 'WPS Spreadsheets Workbook'.
- 3. Input Data and Formulas: Type your item conditions directly into the embedded spreadsheet and use standard formulas like COUNTIF to automatically summarize your text data.
- 4. Save and Update Seamlessly: Click outside the object to display it as a seamless table in your document. Edits are securely updated without the risk of breaking text bookmarks.

Frequently Asked Questions
Can I use COUNTIF in a Word table formula?
No, standard text document table formulas do not support advanced logical functions like COUNTIF. You must either use numerical workarounds (like 1 and 0) with basic SUM and COUNT functions, or embed a spreadsheet object.
Why do my table formulas not update automatically when I change numbers?
Unlike dedicated spreadsheet software, text document table formulas do not update in real-time when source data changes. You must manually select the formula (or the entire document) and press F9 to refresh the calculations.
How do I view the underlying formula codes in my document?
You can toggle the display of field codes by pressing Alt+F9 on your keyboard. This reveals the exact formula syntax (e.g., { =SUM(ABOVE) }) instead of showing the calculated numerical result.




