Even if you are familiar with formulas, you may find some helpful tips here. If not familiar, you should read and bookmark Microsoft’s page on the subject: https://support.microsoft.com/en-us/office/use-a-formula-in-a-word-or-outlook-table-cbd0596e-ea8a-485e-a35d-b2cb2c4f3e27#__toc281293383

You may change formulas without hurting the automation. Start by selecting the formula/result in the document, and from the Word Ribbon select the Insert menu and at far right, the fx symbol for formula. Though the menu is Insert, it also works for editing the formula. The menu item can also be configured into the Data group of the Layout menu:

Note that bookmarks may be used in a formula. If you see a name in a formula that does not look like a grid reference, it will be a bookmark. To find it or other bookmarks, one way is to press Ctl+G, bringing up the Find dialog:

Select “Bookmark” in the left list, then select the desired bookmark from the right combo box where the title is “Enter bookmark name:”. If you delete the proposed name and type another, the list will try to show entries matching what you have typed, always starting at the left end. For example, if you type “Sum” and no entries begin with “Sum” but some start with “S”, it will find the “S” but ignore entries containing “Sum” such as the one in the picture above.

Another way to find a bookmark is to select the Insert page of the Word Ribbon, then select “Bookmark”:

The dialog box presented lists bookmarks, and you may type into the name bar the name of a bookmark to find. With the bookmark selected, click on the Go To button.