Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2019, 04:36 PM
Jennifert Jennifert is offline IF Statements for a several ranges of values using Mail Merge Windows 10 IF Statements for a several ranges of values using Mail Merge Office 2019
Novice
IF Statements for a several ranges of values using Mail Merge
 
Join Date: May 2019
Posts: 1
Jennifert is on a distinguished road
Smile 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'.
Reply With Quote
  #2  
Old 05-01-2019, 08:42 PM
gmayor's Avatar
gmayor gmayor is offline IF Statements for a several ranges of values using Mail Merge Windows 10 IF Statements for a several ranges of values using Mail Merge Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #3  
Old 05-01-2019, 09:40 PM
macropod's Avatar
macropod macropod is offline IF Statements for a several ranges of values using Mail Merge Windows 7 64bit IF Statements for a several ranges of values using Mail Merge Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

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]
Reply With Quote
Reply

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
IF Statements for a several ranges of values using Mail Merge Using multiple IF statements on a mail merge ajh19742000 Mail Merge 1 11-01-2016 06:11 PM
IF Statements for a several ranges of values using Mail Merge 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
IF Statements for a several ranges of values using Mail Merge showing results of If statements in a mail merge m&co Mail Merge 3 01-06-2012 07:27 PM

Other Forums: Access Forums

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