Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Mar 2006
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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

    +IF (D4-D5<0, ??, D4-D5)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    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.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    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).

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    3,947
    Thanks
    0
    Thanked 204 Times in 185 Posts

    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.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •