Skip to content

Word field codes, changing the color or format based on the number

Would you like your Word field codes to change look depending on the value – positive, negative or zero?  That’s easy, just not obvious. 

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 is the independent source of Microsoft Office news, tips and help since 1996. Don't miss our famous free newsletter.