#1
|
|||
|
|||
'If... then... else' - output dependent on multiple fields
Hello, I'm very new to mail merge and need some help.
I am creating a letter template using mail merge which refers to the reader's child or children. Using the 'If... then... else' function I've managed to set it up so it uses the term 'child' if the field 'No of Children' = 1 and 'children' if the value in that field is greater than 1. Simple! However, pronouns are a difficulty. I am able to set it up to refer to children as 'they' if the 'No of Children' value is greater than 1. However, when the value is equal to 1, I need it to then check the 'Gender of Child' field to determine whether to use the pronoun 'He' or 'She'. In short, I want it to check the value of one field and then, if the value of that field =1, to check the value of another field. Is there a way to do this? Thank you! |
#2
|
|||
|
|||
'If... then... else' - comparing two data fields
Me again!
I want to make an "If... then... else..." field that compares two fields from my data source. Basically, I want the field to express "if 'X' does not equal 'Y', print 'X'" where X and Y are two text fields in my database. As it is, I can express 'if 'X' does not equal [fixed value] then...' but it doesn't seem to allow me to compare it to another field. Any ideas? |
#3
|
||||
|
||||
Hi SiBrad,
For the first issue, encode the field as: {IF{MERGEFIELD No_of_Children} > 1 "they" "{IF{MERGEFIELD Gender_of_Child}= "F" "she" "he"}} or: {IF«No_of_Children» > 1 "they" "{IF«Gender_of_Child»= "F" "she" "he"}} For the secondfirst issue, encode the field as: {IF{MERGEFIELD X} = {MERGEFIELD Y} "text for equal" "text for NOT equal"} or: {IF«X» = «Y» "text for equal" "text for NOT equal"} Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. Likewise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
It works! Amazing, thank you.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple identical fields | snorkerz | Word | 4 | 06-25-2012 02:30 PM |
Auditing Dependent Cells | WildBill | Excel | 2 | 09-07-2011 10:14 AM |
Automatic, Dependent Cell Values | flackend | Excel | 2 | 08-26-2011 07:01 AM |
Merge Fields, Pictures and output to email (with attachment) | schilds71 | Mail Merge | 0 | 10-21-2010 12:02 PM |
How to create a Dependent Drop-Down Picklist | ComcoDG | Word | 2 | 03-17-2009 07:57 AM |