# Thread: Table and/or Field Calculations (2000 SP3)

1. ## Table and/or Field Calculations (2000 SP3)

I have spent a fair amount of time searching the forum and have downloaded and read macropod's Word Field Maths but am still unable to do what I need to do. In Excel the formula would be =IF(B5>4000000,100000,round(B5*2.5/100,2)). Whether I do this by table math or by field codes is immaterial - the preferred option is however table math. Can someone please help. Thanks

2. ## Re: Table and/or Field Calculations (2000 SP3)

It might be easier to embed an Excel worksheet in your Word document. Then, you can use Excel's calculation engine.

3. ## Re: Table and/or Field Calculations (2000 SP3)

Hi Raymond,
PS...(Nice flag!) <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

4. ## Re: Table and/or Field Calculations (2000 SP3)

I think that "Table Math" is a shortcut way of inserting fairly simple formula (=) field codes, so really, they are the same thing in the end.

The basic outline for an IF field is as follows:
1. <LI>Press Ctrl+F9 to insert a pair of field braces in the target cell (looks like { } with the insertion point inside)
<LI>Type in IF b5 > 4000000 "100000" "FALSE"
<LI>Select the field and press F9 to refresh the result
<LI>Use Alt+F9 to toggle between showing field codes and results to refine your field
Note: You do not use commas between the TRUE and FALSE values.

To figure out the syntax for the later formula, it is useful to test on a simple table one step at a time. Once you've got the formula (and the Insert>Field... dialog can help with the functions), you can replace the "FALSE" with that and you should have a working solution.

5. ## Re: Table and/or Field Calculations (2000 SP3)

Hi Raymond:
If you follow Jefferson's instructions in <post#=427137>post 427137</post#>, you can then replace False with
{ =round(B5*2.5/100,4) }

where the curly brackets are inserted by pressing Ctrl+F9, not typed. You must place that field within quotes.
Cheers,

6. ## Re: Table and/or Field Calculations (2000 SP3)

Thanks guys. I still could not get it to work so I changed the b5 to a field named with a bookmark and it works fine. Once again the forum to the rescue!

7. ## Re: Table and/or Field Calculations (2000 SP3)

I guess we should have asked where you were putting the formula: references like b5 are only recognized within the same table. <img src=/S/smile.gif border=0 alt=smile width=15 height=15> (Oh, and I believe they need a space after them, before any operator.)

8. ## Re: Table and/or Field Calculations (2000 SP3)

Hi Jefferson,

You can also use cell references from outside a table provided the table is bookmarked and you include the table bookmark in the reference. This is explained in <post#=365442>post 365442</post#>.

Cheers
Oh, and fields that use cell references don't need spaces between the cell references and operators.

#### Posting Permissions

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