Formatting Numbers in Word Mail Merge

You might find that you have difficulty formatting numbers properly when using Mail Merge in Microsoft Word. This can be a problem if you are calculating numbers in your source (especially when your source is an Excel spreadsheet or Access database). For example, you might have a simple gradebook that averages three grades to get a final grade. If a student has grades of 90, 95, and 99, his average will be 94.66666666666666666.... Excel or Access can easily be set to format the numbers to 1 or 2 decimal places, but that formatting will not necessarily show up in your mail merge document. You do not want to send home a mail merge letter to your student's parents congratulating them on their daughter's outstanding average of 94.66666666667 in your class. The letter would be much better if it congratulated them on their daughter's average of 94.7.

In Word 97, here is what you do:

(1) Create the mail merge letter as you normally would, include the field for the final grade. Your merged field will look like this: «FinalGrade»

(2) Right click your mouse on the field and select the Toggle Field Codes option from the popup menu. Your merged field will now look like this: {MERGEFIELD FinalGrade }. This is the same thing as before; it is merely showing the information to you in a different way.

(3) Next, you need to insert a special code to tell Word 97 that you want to round this off to one decimal place. After the name of the field (FinalGrade) and before the bold close curly bracket, type the following: \#0.0

(4) Your merged field now looks like this: {MERGEFIELD FinalGrade \#0.0}. This will round your number to one decimal place, so in the above example the number will be 94.7. If you want to round to two decimal places, use \#0.00 in your merge field. If you want the number to have a dollar sign before it (for anything that is money), use \#$# in your merge field. If you want commas in your number, use \##,### in your merge field. If you want dollars, rounded to two decimal places with commas, use \#$#,##0.00 in your merge field.

Return to ET605 Home Page.

This page was prepared by Dr. David M. Marcovitz.

Last Updated: July 31, 1998