Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2019, 09:52 AM
shawn.low@cox.net shawn.low@cox.net is offline Adding a Table with an "IF" Statement Windows 10 Adding a Table with an "IF" Statement Office 2016
Novice
Adding a Table with an "IF" Statement
 
Join Date: May 2019
Location: Aliso Viejo, CA.
Posts: 24
shawn.low@cox.net is on a distinguished road
Default Adding a Table with an "IF" Statement

Is it possible to add a Table (Table has Text only) using a "IF" statement?
i.e.: {IF <<Opportunity_State>> = "CA" "Add the Table" ""}
So if the Merge Field "Opportunity_State", the Add the Table to the Doc, else, leave the Table out.


Thank you,


Shawn
Reply With Quote
  #2  
Old 05-20-2019, 03:05 PM
macropod's Avatar
macropod macropod is offline Adding a Table with an &quot;IF&quot; Statement Windows 7 64bit Adding a Table with an &quot;IF&quot; Statement Office 2010 32bit
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

Indeed, that is quite possible. Assuming you already have the table, insert plain double quotes either side of it and your mergefield (from the Insert Merge Field dropdown) followed by '= "CA" ' before the leading double quote. You should have something like:
«Opportunity_State»= "CA" "table"
Select all of that and press Ctrl-F9. You should now have
{ «Opportunity_State»= "CA" "table" }
Simply type 'IF' inside the opening brace, thus:
{IF«Opportunity_State»= "CA" "table" }
and you're ready to go.
Note the space after the '=' in the field construction; it's essential.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-21-2019, 09:49 AM
shawn.low@cox.net shawn.low@cox.net is offline Adding a Table with an &quot;IF&quot; Statement Windows 10 Adding a Table with an &quot;IF&quot; Statement Office 2016
Novice
Adding a Table with an &quot;IF&quot; Statement
 
Join Date: May 2019
Location: Aliso Viejo, CA.
Posts: 24
shawn.low@cox.net is on a distinguished road
Default

Thank You Sir, it worked perfectly.


Thanks Paul,
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a Table with an &quot;IF&quot; Statement IF statement just generates text "MERGEFIELD" in document - what am I doing wrong? Eri Mail Merge 1 03-03-2012 03:03 PM
How to edit the "Format" and the "show level" of an EXISTING table of content? Jamal NUMAN Word 2 08-14-2011 10:46 AM
Adding a Table with an &quot;IF&quot; Statement "Table of content" based on "Normal Style" behavior!!!! Jamal NUMAN Word 4 07-08-2011 04:12 AM
How to have colons (:) in the "Table of content" but to be hidden in the "Heading"? Jamal NUMAN Word 0 06-26-2011 04:53 PM
Adding a Table with an &quot;IF&quot; Statement Why the "table of contents" doesn't take the same format of the "headings"? Jamal NUMAN Word 5 06-15-2011 10:14 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:40 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