#1
|
|||
|
|||
IF Statements for a several ranges of values using Mail Merge
Hi guys,
I'm trying to get an IF statement to work based on several ranges of numbers returning text if true, being applied to a Mergefield called 'PriorityScore'. 15-25 Very High 10-14 High 5-10 Medium 1-4 Low I wondered what the best way to do this was? I tried separate IF statements 1 after another but the values pulled only seem to be from the first statement. I then tried nesting these, but had the same issue. Wondering if I'm missing something. Here is the most recent version of the equation that I tried. {IF {MERGEFIELD PriorityScore \* MERGEFORMAT} = > 15 "Very High" "{IF {MERGEFIELD PriorityScore \* MERGEFORMAT} = > 10 "High" "{IF {MERGEFIELD PriorityScore \* MERGEFORMAT} = > 5 "Medium" "{IF {MERGEFIELD PriorityScore \* MERGEFORMAT} = > 1 "Low"}"}"}"} So in all cases, this equation is pulling the value 'Very High'. |
#2
|
||||
|
||||
Your syntax is wrong - change to
{IF {MERGEFIELD PriorityScore } >= 15 "Very High" "{IF {MERGEFIELD PriorityScore } >= 10 "High" "{IF {MERGEFIELD PriorityScore } >= 5 "Medium" "{IF {MERGEFIELD PriorityScore } >= 1 "Low"}"}"}"} which does work.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
||||
|
||||
Another way:
{QUOTE{=INT({MERGEFIELD PriorityScore }/5)-1 \# "'{=INT(({MERGEFIELD PriorityScore }-10)/5)-1 \# "'Very High';'High'"}';'Low';'Medium'"}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
conditional, formula, range |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I know nothing about mail merge, but need help with conditional statements | briyosa | Word | 1 | 03-27-2017 10:17 PM |
Using multiple IF statements on a mail merge | ajh19742000 | Mail Merge | 1 | 11-01-2016 06:11 PM |
Right Justify Values in a Mail Merge | hadenp | Mail Merge | 7 | 12-31-2013 07:40 PM |
Prevent Zero Values being Suppressed in a Mail Merge | HangMan | Mail Merge | 2 | 12-11-2013 02:28 PM |
showing results of If statements in a mail merge | m&co | Mail Merge | 3 | 01-06-2012 07:27 PM |