Thread: [Solved] If and/or in mailmerge
View Single Post
 
Old 09-28-2021, 05:10 PM
Formd Formd is offline Windows 7 32bit Office 2007
Advanced Beginner
 
Join Date: Feb 2015
Location: TX
Posts: 49
Formd is on a distinguished road
Question If and/or in mailmerge

I am using a template to mailmerge a document using multiple "If" conditions.
The outcome should merge a letter, only if the status is not "Expired" and if definitions shows "Client/Pat" or Client/Set.
Problem is, the info still merges if status is "Expired". What am I doing wrong?
Attached is my template, sample db and my document after merged.


IF Definition1 = Client/Pat OR Definition1 = Client/Set AND Status1 is not = Expired
then letter should merge.

This is the code I am using:
IF{={IF{MERGEFIELD Definition1}= "Client/Pat" 1 0}+{IF{MERGEFIELD Definition1} = "Client/Set" 1 0} \# 0}>0 {IF{MERGEFIELD Status1} = "Expired" "" "Letter goes here"}
Attached Files
File Type: doc Template.doc (42.0 KB, 8 views)
File Type: xlsx Data.xlsx (8.9 KB, 7 views)
File Type: doc Merge Outcome.doc (27.0 KB, 6 views)
Reply With Quote