Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-06-2021, 01:52 PM
eduzs eduzs is offline Two conditions IF field Windows 10 Two conditions IF field Office 2019
Expert
Two conditions IF field
 
Join Date: May 2017
Posts: 260
eduzs is on a distinguished road
Default Two conditions IF field

I need a field for using in a mail merge like:
IF Mergefield X="A" AND Mergefield Y="" then "Yes" else "No"
Is there a way to do that with field code?
Thanks!
Reply With Quote
  #2  
Old 06-06-2021, 03:43 PM
macropod's Avatar
macropod macropod is offline Two conditions IF field Windows 10 Two conditions IF field Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

There are many ways. For example:
{IF{MEGEFIELD X}= "A" {IF{MEGEFIELD Y}= "" "Yes" "No"} "No"}

{={IF{MEGEFIELD X}= "A" 1 0}*{IF{MEGEFIELD Y}= "" 1 0} \# "'Yes';;'No'"}

The second is simpler to implement once you start getting multiple AND/OR conditions to evaluate.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 06-06-2021, 04:57 PM
eduzs eduzs is offline Two conditions IF field Windows 10 Two conditions IF field Office 2019
Expert
Two conditions IF field
 
Join Date: May 2017
Posts: 260
eduzs is on a distinguished road
Default

Works fine! Thanks!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sum with conditions xling Excel 2 08-15-2017 12:16 AM
Delete Tables using conditions from Drop Down Field tejaspareek Word VBA 7 11-02-2014 10:24 PM
6 conditions formula paconovellino Excel 2 03-05-2012 06:45 AM
Two conditions IF field 3 Conditions Laurie B. Excel 4 08-15-2011 10:27 PM
how to set an equation with three conditions? Jamal NUMAN Word 0 07-09-2011 06:05 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:36 AM.


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