Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Conditional If statement
I am working on a mail merge label that if the Age field is less than 13 the
ParentName field needs to appear underneath the ChildName field. The If statement below is working correctly if there is a figure in Age however, if that field is blank it is creating a blank label with the ParentName in it. {If "13" "{mergefield ParentName}" ""} Any ideas would be greatly appreciated. Thanks |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Conditional If statement
Hi Maria,
If your Age field is empty, it should evaluate to 0, so the parent's name would be expected to appear in such cases. But so should the child's name, so I don't understand the bit about the "blank label with the ParentName in it". Perhaps you could give a bit more explanation about this. If you're simply trying to suppress the parent's name when the child's age is missing, try: {IF{MERGEFIELD Age} 0 {IF{MERGEFIELD Age} 13 {MERGEFIELD ParentName}}} Cheers -- macropod [MVP - Microsoft Word] ------------------------- "Maria" wrote in message ... I am working on a mail merge label that if the Age field is less than 13 the ParentName field needs to appear underneath the ChildName field. The If statement below is working correctly if there is a figure in Age however, if that field is blank it is creating a blank label with the ParentName in it. {If "13" "{mergefield ParentName}" ""} Any ideas would be greatly appreciated. Thanks |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Conditional If statement
Thank you very much, that was also what needed to be accomplished, if there
was no Age then it should be blank instead of returning the parentname. Your input was greatly appreciated and your if statement worked correctly. Thanks again. "macropod" wrote: Hi Maria, If your Age field is empty, it should evaluate to 0, so the parent's name would be expected to appear in such cases. But so should the child's name, so I don't understand the bit about the "blank label with the ParentName in it". Perhaps you could give a bit more explanation about this. If you're simply trying to suppress the parent's name when the child's age is missing, try: {IF{MERGEFIELD Age} 0 {IF{MERGEFIELD Age} 13 {MERGEFIELD ParentName}}} Cheers -- macropod [MVP - Microsoft Word] ------------------------- "Maria" wrote in message ... I am working on a mail merge label that if the Age field is less than 13 the ParentName field needs to appear underneath the ChildName field. The If statement below is working correctly if there is a figure in Age however, if that field is blank it is creating a blank label with the ParentName in it. {If "13" "{mergefield ParentName}" ""} Any ideas would be greatly appreciated. Thanks |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
which statement right , question is Choose the correct statement? | Microsoft Word Help | |||
which statement right , question isChoose the correct statement? | Microsoft Word Help | |||
IF Statement | Mailmerge | |||
Conditional Slash Similar to Conditional Hyphen? | Page Layout | |||
Need help with conditional if statement | Mailmerge |