How to Insert an X-Bar in Microsoft Word

It's late at night, and you're working on your paper or project that's due tomorrow. You've got all kinds of statistical information that you have to include. You've got your tables and your graphs. But just how the hairy-heck do you get an X-bar symbol for the mean?  It's a little complicated if you follow Microsoft's directions. I have put together the following guide. I hope this is easier to follow than the cryptic information I had to use as a reference.


  1. Press "CTRL" and "F9". This opens a slightly grayed area in your document. This is an equation field. It should look something like this:

Equation Brackets

  1. Type the following information into the space between the brackets: eq \o(X,
    Your equation field should look like this:

Equation Step 1
(There is a space after the Q.)

  1. Unfortunately, the only way to get a line that best fits the top of the X is to insert a symbol that isn't on the keyboard. With the cursor immediately after the comma in the equation field, click on Insert on the menu bar and select Symbol.

    Make sure that the Symbol tab is showing in the dialogue window, and that the Font: selection says "(normal text)".  If you have any other font selected, the characters displayed will be different, and this won't work.

    Select the symbol between the Registered Trademark and degree symbol. Click on the Insert button and then click on the Close button. You want to find the following in the Symbol dialogue window:

Overscore
(You want the symbol in the middle
which  I'm calling an "overscore".)

  1. After you have inserted the overscore symbol, type in a closing parenthesis. Your equation should now look like this:

Completed Equation
(Make sure it looks exactly like this, or you will get an error.)

5.      Unfortunately, the overscore will be a little too close to the top of the X to be legible. But we can change that. In the equation field, select the overscore symbol as if you were going to copy or delete it. Click on Format from the menu bar and select Font.

In the Font dialogue window, click on the tab at the top marked Character Spacing. Change the drop menu for Position: to Raised, and set the By: value to 1 pt. Click on the OK button. Your equation should look like this:

Equation 3
(Notice that the bar is slightly higher than before)

6.      Use the right mouse button and click on the gray area. From the context menu that appears, select Toggle Field Codes. This will turn off the equation editor and show your final product. If it still has a gray box around the X-bar symbol, don't worry. The gray box is just there to tell you that it's a coded character. It won't be transferred to your printer. Either way, gray or not, it should look something like the following:

X Bar

So, you think this is a lot of work and you don't want to do it every time or have to worry about copy and paste? Neither do I.

Word has this nifty little feature called "Autocorrect." It's the thing that fixes some of the more common typographical errors - such as replacing "teh" with "the." Well, you can use it to automate the entering of an X-bar. Just follow these rather easy steps.

1.      Create an X-bar in a blank document using the above directions.

2.      Select the X-bar symbol as if you were going to copy and paste it somewhere else.

3.      Click on "Tools" and then select "Autocorrect Options" (I'm using Word XP/2002. It might be on a different menu in other versions of Word, but it is there).

4.      If you're not already there, click on the "Autocorrect" tab. Notice the text boxes in the bottom half of the Autocorrect window.

 

  1. Notice where the arrow is pointing - the "Replace" cell. And if you look to the right, you'll see that the "With" cell already has the X-bar symbol in it - complete with the gray background telling you that it's a Field Code. This is because I selected the X-bar symbol before opening "Autocorrect Options."

6.      In the "Replace" cell, I chose to type "XX_", then I clicked "Add." The window now displays what you see below. If you look through the list of corrections, you'll see that Word is actually replacing "XX_" with the contents of the Field Code.

 

  1. Click on "OK" and you're done.

So, there you have it. Now, whenever I type "XX_" in a Word document, Word will automatically insert the Field Codes for my X-bar symbol. You might choose another combination, but the result will be the same. And, you only have to do this once - ever so much easier than entering the code or having to copy and paste from an existing document.

The content and images on these pages are Copyright 2000-2004 by Derek A. Gwinn, MA, CFLE
I can be contacted through the following e-mail address: howto@gwinn.us
Last Modified: February 07, 2005