A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using AND in a field code



 
 
Thread Tools Display Modes
  #1  
Old December 22nd, 2008, 05:16 PM posted to microsoft.public.word.mailmerge.fields
Simon
external usenet poster
 
Posts: 368
Default Using AND in a field code

I'm trying to use field codes, and distilled down to a test case with a
formula embedded in the first IF expression:

{IF {=AND(12,13)} = 1 "OK" "BAD"}

Looks simple enough - but I can't get this to display 'OK' - even when I
update the field. I did see it work - but now it's gone again. Seems utterly
unreliable. Is this a bug and is there a fix?
  #2  
Old December 22nd, 2008, 05:43 PM posted to microsoft.public.word.mailmerge.fields
Astrid
external usenet poster
 
Posts: 17
Default Using AND in a field code

Hi Simon,

Just a thought, depending on your location and international settings of
your system, the ',' in the formula could be need to replace with ';'

"Simon" wrote:

I'm trying to use field codes, and distilled down to a test case with a
formula embedded in the first IF expression:

{IF {=AND(12,13)} = 1 "OK" "BAD"}

Looks simple enough - but I can't get this to display 'OK' - even when I
update the field. I did see it work - but now it's gone again. Seems utterly
unreliable. Is this a bug and is there a fix?

  #3  
Old December 22nd, 2008, 09:51 PM posted to microsoft.public.word.mailmerge.fields
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Using AND in a field code

Hi Simon,

Delete the space before the '=' sign.

So, instead of:
{IF {=AND(12,13)} = 1 "OK" "BAD"}
use:
{IF {=AND(12,13)}= 1 "OK" "BAD"}

Note too that both sets of field brace pairs (ie '{ }') for the field code are created via Ctrl-F9 - you can't simply type them or
copy & paste them from this message.

For more information on doing 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

--
Cheers
macropod
[MVP - Microsoft Word]


"Simon" wrote in message ...
I'm trying to use field codes, and distilled down to a test case with a
formula embedded in the first IF expression:

{IF {=AND(12,13)} = 1 "OK" "BAD"}

Looks simple enough - but I can't get this to display 'OK' - even when I
update the field. I did see it work - but now it's gone again. Seems utterly
unreliable. Is this a bug and is there a fix?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.