Document Editing Problems

Create a Percentage Range IF Field in Microsoft Word

Muhammad TalhaMuhammad Talha Nov 20, 2026 869 views

Question details

Create a Word field that displays different text depending on whether a percentage falls within a specified range.

Create a Percentage Range IF Field in Microsoft Word
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.
Before you start

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.

Solution 1Recommended

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.

1
Insert the outer field

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.

2
Add the nested fields

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.

3
Complete the condition

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.

4
Preview the results

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.

Use a nested IF field for the percentage range
Values stored as whole numbers: If the data source stores 60% as 60 rather than 0.6, replace 0.5 and 0.1 with 50 and 10. To display nothing for one outcome, use empty quotation marks for that outcome.
Free Microsoft Office alternative

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.

Edit documents in a familiar word-processing interfaceOpen and save Microsoft Word DOC and DOCX formatsWork with mail merge documents and review their contentUse a free, lightweight Office alternative
microsoft office alternative - wps office

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.