#1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Wolfgang Gary Wolfgang Gary is offline
external usenet poster
 
Posts: 4
Default IF-construct?

I want to make following IF-Statement:

IF (PMTest_Ergebnis=71 AND PMTest_Ergebnis75 AND FallBsp_Ergebnis=80)
THEN "OK" ELSE "Not passed"

I havnt found a solution with {if ..} Statements which will work.

thanks for your support & any tipp

best regards
Wolfgang


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default IF-construct?

Hi Wolfgang

To see how to do this and a wide range of other calculations in Word, check
out my Word Field Maths 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/show...?Number=365442
or
http://www.gmayor.com/downloads.htm#Third_party
In particular, look at the item titled 'Testing Or Returning Text Strings With Logical Functions In Bookmarks'

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Wolfgang Gary" wrote in message ...
I want to make following IF-Statement:

IF (PMTest_Ergebnis=71 AND PMTest_Ergebnis75 AND FallBsp_Ergebnis=80)
THEN "OK" ELSE "Not passed"

I havnt found a solution with {if ..} Statements which will work.

thanks for your support & any tipp

best regards
Wolfgang


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Wolfgang Gary Wolfgang Gary is offline
external usenet poster
 
Posts: 4
Default IF-construct?

thanks for your tipp, but its not working.

To check only one mergefield is working fine: {if {mergefield
PM_TEST_RESULT}="80" "OK" "not passed"}

But how to achieve logical ADD for two or more fields?
{if ({mergefield PM_TEST_RESULT}="80")*({mergefield
FALLSTUDIE_RESULT}="80") "OK" "not passed"} is not working.

Thanks for any tipp
best regards
Wolfgang


  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default IF-construct?

Hi Wolfgang,

Try:
{IF{if {mergefield PM_TEST_RESULT}= 80 1 0}*{IF{mergefield FALLSTUDIE_RESULT}= 80 1 0}= 1 "OK" "not passed"} }

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Wolfgang Gary" wrote in message ...
thanks for your tipp, but its not working.

To check only one mergefield is working fine: {if {mergefield
PM_TEST_RESULT}="80" "OK" "not passed"}

But how to achieve logical ADD for two or more fields?
{if ({mergefield PM_TEST_RESULT}="80")*({mergefield
FALLSTUDIE_RESULT}="80") "OK" "not passed"} is not working.

Thanks for any tipp
best regards
Wolfgang


  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default IF-construct?

Your syntax is wrong - see Macropod's reply and notice especially the shape
of the brackets. The curly {}field boundary brackets are all inserted with
CTRL+F9.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Wolfgang Gary wrote:
thanks for your tipp, but its not working.

To check only one mergefield is working fine: {if {mergefield
PM_TEST_RESULT}="80" "OK" "not passed"}

But how to achieve logical ADD for two or more fields?
{if ({mergefield PM_TEST_RESULT}="80")*({mergefield
FALLSTUDIE_RESULT}="80") "OK" "not passed"} is not working.

Thanks for any tipp
best regards
Wolfgang





  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default IF-construct?

Either

{ IF { ={ IF { mergefield PM_TEST_RESULT } = 80 1 0}*{ IF { mergefield
FALLSTUDIE_RESULT }= 80 1 0 } = 1 } "OK" "not passed" }

or
{ IF { ={ COMPARE { mergefield PM_TEST_RESULT } = 80 }*{ COMPARE {
mergefield FALLSTUDIE_RESULT }= 80 } = 1 } "OK" "not passed" }

All the {} need to be the special field code braces that you can insert
using ctrl-F9

Peter Jamieson


"Wolfgang Gary" wrote in message
...
thanks for your tipp, but its not working.

To check only one mergefield is working fine: {if {mergefield
PM_TEST_RESULT}="80" "OK" "not passed"}

But how to achieve logical ADD for two or more fields?
{if ({mergefield PM_TEST_RESULT}="80")*({mergefield
FALLSTUDIE_RESULT}="80") "OK" "not passed"} is not working.

Thanks for any tipp
best regards
Wolfgang



  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Wolfgang Gary Wolfgang Gary is offline
external usenet poster
 
Posts: 4
Default IF-construct?

I have found a working solution:

{ IF { ={ IF { mergefield PM_TEST_RESULT } = "80" 1 0}*{ IF { mergefield
FALLSTUDIE_RESULT }= "80" 1 0 }} = "1" "OK" "not passed" }

Please note the quote in the IF expressions.

thanks for your tipps
Wolfgang


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
How do I construct a manual? markthewelder New Users 2 May 3rd 07 10:36 PM
How can I use Bengali letters to construct Bengali words? Sayantan Chakraborty, Electrical Enginee New Users 0 May 31st 06 04:57 AM
how can I construct a hyperlink from concatenating text and merge. Dr Stephen K Tagg Mailmerge 3 March 16th 05 11:55 PM


All times are GMT +1. The time now is 06:14 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"