View Single Post
 
Old 04-23-2014, 02:47 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
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 bigukfan,

You can't use the * wildcard on both sides of a constant; only before or after. You can use the ? wildcard that way, including in conjuction with the * wildcard on the other side of the constant, but then you have to know exactly how many characters you're dealing with on the ? side of the constant.

There's no particular reason I can see from what you've posted for nested IFs. Using the examples from your first post, you could simply have a sequence of IF fields:
{IF{MERGEFIELD AR}= "never" {MERGEFIELD AR}}{IF{MERGEFIELD AR}= "slight" {MERGEFIELD AR}}{IF{MERGEFIELD AR}= "moderate" {MERGEFIELD AR \* Charformat}}{IF{MERGEFIELD AR}= "severe" {MERGEFIELD AR \* Charformat}}

Nesting is useful where you have multiple conditions that evaluate one way and others that evaluate another way, but you don't want to test them all independently, as per the above, Which could be used thus:
{IF{MERGEFIELD AR}= "never" {MERGEFIELD AR} {IF{MERGEFIELD AR}= "slight" {MERGEFIELD AR} {MERGEFIELD AR \* Charformat}}}
or if the evaluation of one element is dependent on the evaluation of another (but that typically entails evaluating two mergefields to determine the output).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote