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  

Mail Merge Formula - Logic Stumped



 
 
Thread Tools Display Modes
  #1  
Old May 28th, 2010, 02:04 PM
MaxArk MaxArk is offline
Experienced Member
 
First recorded activity by OfficeFrustration: Mar 2008
Posts: 35
Default Mail Merge Formula - Logic Stumped

I am extracting data for a mailmerge document from an excel database. One field of my report (a column ... B1 ... from the database) can be only one of three values ("Current Config.", a user entered value, or blank)

I have check boxes in my merge document that use a merge formula to populate.

Checkbox 1 ("Reline" is checked when B1 = "Current Config.", and Checkbox 2 is unchecked.

Checkbox 2 ("Changeover") is checked when B1 = any user entered value, and checkbox 1 is unchecked

If B1 = blank, or empty, both checkboxes are empty.

The merge formula I have established for Checkbox 1 is very straightforward:
Code:
{IF{MERGEFIELD R1RelineType}="Current Config." "1" "2"}
But I'm struggling over the logic behind the formula for checkbox 2 ... if basically needs to assign 1 when R1RelineType does not = "Current Config" or is not blank.

Can anyone provide any direction? I'm stumped.

Jenn
  #2  
Old May 28th, 2010, 10:28 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Mail Merge Formula - Logic Stumped

The following will return 1 if R1RelineType = "Current Config." or is blank
and 2 if it is anything else.

{IF{MERGEFIELD R1RelineType}="Current Config." "1" { IF { MERGEFIELD
R1RelineType } = "" "1" "2" } }



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"MaxArk" wrote in message
...

I am extracting data for a mailmerge document from an excel database.
One field of my report (a column ... B1 ... from the database) can be
only one of three values ("Current Config.", a user entered value, or
blank)

I have check boxes in my merge document that use a merge formula to
populate.

Checkbox 1 ("Reline" is checked when B1 = "Current Config.", and
Checkbox 2 is unchecked.

Checkbox 2 ("Changeover") is checked when B1 = any user entered value,
and checkbox 1 is unchecked

If B1 = blank, or empty, both checkboxes are empty.

The merge formula I have established for Checkbox 1 is very
straightforward:

Code:
--------------------
{IF{MERGEFIELD R1RelineType}="Current Config." "1" "2"}
--------------------


But I'm struggling over the logic behind the formula for checkbox 2 ...
if basically needs to assign 1 when R1RelineType does not = "Current
Config" or is not blank.

Can anyone provide any direction? I'm stumped.

Jenn




--
MaxArk


 




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 03:58 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.