Skip to content

How to Change Word Field Code Colors or Formatting Based on Number Values

Did you know you can make Microsoft Word automatically change text color or formatting depending on whether a number is positive, negative, or zero? With field codes like {SEQ} or {MERGEFIELD}, it’s easy to apply different font styles, colors, or highlights directly in your document—no macros required. This simple formatting trick lets you visually distinguish numerical results just like in Excel, enhancing readability and precision in professional Word files.

It possible to have different formatting for positive;negative;zero values for Word field codes like {SEQ} {MERGEFIELDS} and many others.  Just separate each type of format with a semi-colon.

That’s the standard advice but there’s more which isn’t always mentioned.  How to change the formatting for each type of result – for example show negative values in a red font.

All you need do is show the field codes (ALT + F9) then select part of the \# format string and change the text formatting to whatever you like.

Select the formatting codes then apply formatting from Home | Font or mini-toolbar like any other text. 

Just change the look of the cell formatting codes – those changes will be applied to the displayed value, if applicable. As you can see, font color, size, bold, italic, strikethrough and even Highlighting or the font can be changed.

Different to Excel

There’s confusion because in Excel, the cell formatting is similar with positive;negative;zero options with semi-colon separator.  But Excel uses special color codes in square brackets like [Red] which appear in the formatting string, but they don’t work in Word.

using [Red] as a color code in Excel.

Word field codes for everyone
All the \* named format switches for Word field codes
Choices for formatting fields in Word Mail Merge

About this author

Office-Watch.com

Office Watch is the independent source of Microsoft Office news, tips and help since 1996. Don't miss our famous free newsletter.

Office 2024 - all you need to know. Facts & prices for the new Microsoft Office. Do you need it?

Microsoft Office upcoming support end date checklist.


Latest from Office Watch