Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-12-2012, 04:40 AM
SiBrad SiBrad is offline 'If... then... else' - output dependent on multiple fields Windows 7 32bit 'If... then... else' - output dependent on multiple fields Office 2003
Novice
'If... then... else' - output dependent on multiple fields
 
Join Date: Jan 2012
Posts: 3
SiBrad is on a distinguished road
Default '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!
Reply With Quote
  #2  
Old 01-12-2012, 08:09 AM
SiBrad SiBrad is offline 'If... then... else' - output dependent on multiple fields Windows 7 32bit 'If... then... else' - output dependent on multiple fields Office 2003
Novice
'If... then... else' - output dependent on multiple fields
 
Join Date: Jan 2012
Posts: 3
SiBrad is on a distinguished road
Default '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?
Reply With Quote
  #3  
Old 01-12-2012, 10:51 PM
macropod's Avatar
macropod macropod is offline 'If... then... else' - output dependent on multiple fields Windows 7 64bit 'If... then... else' - output dependent on multiple fields Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #4  
Old 01-13-2012, 02:56 AM
SiBrad SiBrad is offline 'If... then... else' - output dependent on multiple fields Windows 7 32bit 'If... then... else' - output dependent on multiple fields Office 2003
Novice
'If... then... else' - output dependent on multiple fields
 
Join Date: Jan 2012
Posts: 3
SiBrad is on a distinguished road
Default

It works! Amazing, thank you.
Reply With Quote
Reply

Thread Tools
Display Modes


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
'If... then... else' - output dependent on multiple fields 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

Other Forums: Access Forums

All times are GMT -7. The time now is 05:02 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft