#1   Report Post  
Posted to microsoft.public.word.tables
Duncan Duncan is offline
external usenet poster
 
Posts: 21
Default If formula

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.
  #2   Report Post  
Posted to microsoft.public.word.tables
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default If formula

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


"Duncan" wrote in message
...
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.





  #3   Report Post  
Posted to microsoft.public.word.tables
Duncan Duncan is offline
external usenet poster
 
Posts: 21
Default If formula

You are a legend.

Thank you for this.
  #4   Report Post  
Posted to microsoft.public.word.tables
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default If formula

You are welcome.

--
Stefan Blom
Microsoft Word MVP


"Duncan" wrote in message
...
You are a legend.

Thank you for this.



  #5   Report Post  
Posted to microsoft.public.word.tables
Microsmith Microsmith is offline
external usenet poster
 
Posts: 9
Default If formula

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.

"Duncan" wrote:

You are a legend.

Thank you for this.

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hlp! Seq within Formula dee Tables 10 October 15th 07 11:09 PM
Formula Roger Tables 3 May 14th 06 06:07 PM
how to align caption of formula right whereas formula itself left Martin van Leeuwen Microsoft Word Help 1 October 22nd 05 06:39 AM
Formula help? Michael_Corral Microsoft Word Help 1 June 21st 05 07:44 PM
Need a formula Peter Microsoft Word Help 2 May 4th 05 02:46 PM


All times are GMT +1. The time now is 08:11 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"