Create a Percentage Range IF Field in Microsoft Word
Question details
Create a Word field that displays different text depending on whether a percentage falls within a specified range.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A mail merge document needs conditional text based on a percentage in a data source.
- Observed behavior
- The document should display one message for values from 40% through 60% and another for values outside that range.
Check the source column name and how its numeric values are stored. For example, an Excel value displayed as 60% may be passed to Word as 0.6, rather than 60.
Use a nested IF field for the percentage range
Use this method to show different mail merge text for values inside or outside an inclusive 40%–60% range.
The formula checks the distance from the midpoint of the range. For decimal values, the midpoint is 0.5 and the allowed distance is 0.1.
Place the cursor where the conditional text should appear. In Word for Windows, press Ctrl+F9 to insert the outer field braces; do not type the braces manually.
Inside the outer braces, enter IF, then use Ctrl+F9 to insert a nested formula field. Inside the formula, enter = ABS(, insert another field with Ctrl+F9, and enter MERGEFIELD Performance. Finish the formula with - 0.5). Replace Performance with your data source's column name, or insert the merge field through Mailings > Insert Merge Field.
After the formula field, enter <= 0.1 "Text for 40–60%" "Text for below 40% or above 60%". The complete structure should read: { IF { = ABS({ MERGEFIELD Performance } - 0.5) } <= 0.1 "Text for 40–60%" "Text for below 40% or above 60%" }. Every brace pair must be a Word field brace.
Use Mailings > Preview Results and move through records to check values inside and outside the range. In Word for Windows, press Alt+F9 to toggle field codes and select the field and press F9 to update it.

Edit Word documents with WPS Writer
WPS Office is a free, lightweight alternative with a familiar interface for editing documents. Open existing Word files to make migration easier, but verify complex mail merge fields in Microsoft Word because their behavior may differ.

Frequently Asked Questions
How do I know whether to use 0.5 or 50 in the formula?
Check the underlying numeric value in your data source. If 60% is stored as 0.6, use 0.5 and 0.1; if it is stored as 60, use 50 and 10.
Are 40% and 60% included in the range?
Yes. The <= comparison includes both endpoints: values exactly 40% or 60% meet the condition.
Why does Word show the field code instead of the result?
In Word for Windows, press Alt+F9 to toggle between field codes and results. You can also select the field and press F9 to update it.
Can I leave the document blank when the condition is false?
Yes. Replace the false-result text with empty quotation marks: "". Keep the true-result text in the preceding pair of quotation marks.




