Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Multiple Indexes in a Document.

Multiple Indexes in a Document

Written by Allen Wyatt (last updated December 23, 2023)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021


4

Marc has a multi-sectioned document. He wants to create an index on one section and a second index for the entire document. Marc wonders if there is a way to have two indexes in a document where one of them covers only a single section.

The short answer is yes, there is a way. When you insert an index into a document, what you are actually doing is inserting the INDEX field. With no switches used in the field, Word creates an index based on the entire document. To create an index based on only a portion of the document (such as on a single section), follow these general steps:

  1. Select the document section that you want to have indexed in its own special index.
  2. Create a bookmark that applies to the selected text. (Click the Bookmark tool on the Insert tab of the ribbon.) Remember the name you used for the bookmark.
  3. Create the basic INDEX field. (Press Ctrl+F9 to insert field braces and type the word INDEX.)
  4. After the word INDEX, type a space, \b (to indicate that this index will apply to only a bookmarked area of the text), another space, and the name of the bookmark you created in step 2. Your entire field should look something like this:
  5. { INDEX \b MySection }
    
  6. Press F9 to collapse the field and create your index.

There is another way to approach the problem, as well: You could add a switch to the XE field that is used to create an index entry. For instance, let's say you are indexing the term "polar bear" for the index. Make sure you have a field near the term like this one:

{ XE "polar bear" \f "a" }

The \f switch should appear only for index entries in the section that you want to have its own index. Later, when you insert the INDEX field to create the index for that section, you should make sure it looks like this:

{ INDEX \f "a" }

The index created by this field will only include those index entries that use the \f switch followed by the letter "a".

This addition of a switch to the XE field is handy, and it opens up another potential use. Say that you want two indexes for the entire document, perhaps one for places and one for people. All you need to do is follow these general steps:

  1. Insert index entries for all of the places you want indexed. Make sure that these index entries all include the \f switch followed by the letter "a".
  2. Insert index entries for all of the people you want indexed. Make sure that these index entries all include the \f switch followed by some other letter, such as "b".
  3. At the point you want your index for places, insert an INDEX field and include the \f switch followed by the letter "a".
  4. At the point where you want your index for people, insert an INDEX field and include the \f switch followed by the letter "b".
  5. Update all the fields in your document. (Press Ctrl+A and then press F9.)

This should provide you with the two indexes you want. The key is that you are using the /f switch in the XE field to indicate which index (specified by the INDEX field with the same /f switch) should include that entry.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (12137) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Word here: Multiple Indexes in a Document.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Selecting a Paper Source

If your printer allows you to specify different paper trays as sources for paper, you need to know how to select those ...

Discover More

Clearing Everything Except Formulas

Need to get rid of everything in a worksheet except for your formulas? You can do it rather easily by applying the ideas ...

Discover More

Changing How Arrows Look

If you use Excel's graphic capabilities to insert a line or an arrow into a worksheet, you can change how that arrow ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Creating an Index Entry for a Range of Pages

Putting together an index for your documents can be challenging, but Word provides some great tools to make the task ...

Discover More

Using Subentries in an AutoMark File

If you have a large document and need to create a complicated index, an AutoMark file can make your life much easier. ...

Discover More

Creating an Index Entry

In order to create an index, you first need to create the entries that will be used to compile the index. Here's how you ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 + 7?

2024-01-16 16:02:31

Paul

The last line of the article uses forward slashes— "/f"— instead of back slashes as previously—"\f". Was this intentional?


2024-01-02 09:45:24

Andrew

Barry, the answer is yes, and in a similar way. The table of contents field {TOC} has a "\b BookmarkName" bookmark switch which "Collects entries only from the portion of the document marked by the specified bookmark."


2023-12-29 04:11:48

Barry Pegram

Hi. Thank you once more for all of the tips. Regarding the Multiple Indexes... is it possible to do a similar thing with the TOC and if so how, please.


2023-12-23 06:16:50

Roger

Hi
Thanks for the above tip ref two indexes ie Places and People.
I use the (excellent) concordance file method for indexing. Is there a way of using a Place Concordance file and a People Concordance file to achieve the same?
Regards
Roger


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.