Home |
Search |
Today's Posts |
#1
|
|||
|
|||
IF to Test a Value
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 |
#2
|
|||
|
|||
You will need a differnt field code for each rate expression:
{ IF {MERGEFIELD YourMergeField } = "1"{MERGEFIELD YourOtherMergeField}} { IF {MERGEFIELD YourMergeField } = "2"{MERGEFIELD YourOtherMergeField}} etc. |
#3
|
|||
|
|||
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 -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Greg wrote: You will need a differnt field code for each rate expression: { IF {MERGEFIELD YourMergeField } = "1"{MERGEFIELD YourOtherMergeField}} { IF {MERGEFIELD YourMergeField } = "2"{MERGEFIELD YourOtherMergeField}} etc. |
#4
|
|||
|
|||
Hi Greg
I got it working. I would also try Graham's suggestion Thanks to both of you |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
List Num field | New Users | |||
Creating Test With Answers | New Users | |||
Test | New Users | |||
test | Microsoft Word Help | |||
I can print a test page, but word documents will print a blank pa. | Microsoft Word Help |