Create a formula in a Word Table (Word 2007)

Hello Again!

I created a Word 2007 template that has a table in it. So far, my simple additions and subtractions work, but at the end of the table I want to calculate a refund that would say, IF D4-D5 is less than 0, THEN the total sum of D6 is the result, OR ELSE the sum of D6 is D4-D5.

Below is the formula I have been trying to use, but I don't know what to put for the THEN part

Re: Create a formula in a Word Table (Word 2007)

It's not clear what you want to accomplish. If you want to place the formula in cell D6, I don't understand what you mean by "the total sum of D6 is the result". If you want to place the formula in another cell, I don't understand what you mean by "the sum of D6 is D4-D5".

It might be easier to insert an Excel table in your Word document, since Excel formulas are much easier to create and edit than Word formulas.

Re: Create a formula in a Word Table (Word 2007)

The following thread probably is your best Lounge resource for writing formulas using Word field codes. Not everything is possible, but if you are willing to nest a lot of fields together, at lot of things can be done. See Word Field Maths (1.3).

Re: Create a formula in a Word Table (Word 2007)

Hi Giulia,

Assuming you want to sum D16 when D4-D5<0, you could use a field coded as:
{=IF(D4<D5,SUM(D16),D4-D5)}
plus any formatting switches you might need. For IF tests involving straight numeric calculations, the syntax is the same as in Excel.