If formula

D

Duncan

Hi

I hope someone out there can help me?

I am using the TextForm field button within my doc.
Under the "Properties" of each field, the "Bookmark" is Text32, Text37,
Text42 and Text47

I am trying (and failing) to add a new field that will perform a calculation
based on the fields named above.

What I want the calculation to do is as follows:

If (Text32 + Text37) = (Text42 + Text47) then "Ok" else ((Text32 +
Text37)-(Text42 + Text 47))

Can anyone please point me in the right direction?

Thanks in advance.
 
S

Stefan Blom

In the field properties, choose the "Calculate on exit" option. Then create
fields as follows:

{ SET test1 { = { Text32 } + { Text37 } } }

{ SET test2 { = { Text 42 } + { Text 47 } } }

{ IF { test1 } = { test2 } "Ok" "{ = { test1 } - { test2 } }" }

To insert each pair of field delimiters, { }, press Ctrl+F9. When you are
done, press F9 to update. Finally, protect the document again and try the
code.

In an unprotected document, you can show/hide field codes by pressing
Alt+F9.

--
Stefan Blom
Microsoft Word MVP


in message
news:[email protected]...
 
M

Microsmith

Hi Duncan,

One tool that works great for creating formulas in Word is "Formula Builder
for MS Word". You can find it at most major download sites.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top