Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / March 2005

Tip: Looking for answers? Try searching our database.

IF to Test a Value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
prkhan56 - 03 Mar 2005 13:11 GMT
Hello All,
I posted this yesterday but cannot see it in the group.. so posting the
problem again

I am using Windows XP/Office 2003 and have the following problem:

I have a MailMerge Document .. The data is in Excel

I wish to test the Fieldname 'CONT' shown at the top of the merge
document.  The value will be from 1 to 5 and 'RATE' is shown in
five different places.

For Eg If CONT = 2

RATE in first and second place should show the value from the Excel
file, and should show blank in third, fourth and fifth place..
similarly if CONT = 4 . .. then the fifth RATE will be blank

I tried something like this for CONT = 2 but did not succeed.. I have
used Ctrl F9 for inserting the field
{IF{MERGEFIELD "CONT" > 1 ={MERGEFIELD "RATE" \# 0.00}"
""}

I would like to do the same for upto CONT = 5

Can anybody give me a clue please

TIA

Rashid
Greg - 03 Mar 2005 13:23 GMT
You will need a differnt field code for each rate expression:

{ IF {MERGEFIELD YourMergeField } >= "1"{MERGEFIELD
YourOtherMergeField}}
{ IF {MERGEFIELD YourMergeField } >= "2"{MERGEFIELD
YourOtherMergeField}}
etc.
Graham Mayor - 03 Mar 2005 15:11 GMT
Hmmm

{ IF {MERGEFIELD YourMergeField } = "1" "{MERGEFIELD
YourOtherMergeField}"}{ IF {MERGEFIELD YourMergeField } = "2" "{MERGEFIELD
YourOtherMergeField}"}etc

might be nearer the mark. If you use >= you would get multiple entries.

All the relevant conditional fields follow one another on the same line

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

> You will need a differnt field code for each rate expression:
>
[quoted text clipped - 3 lines]
> YourOtherMergeField}}
> etc.
prkhan56 - 07 Mar 2005 15:53 GMT
Hi Greg
I got it working.

I would also try Graham's suggestion

Thanks to both of you
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.