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

Resizing Checkboxes

If you create a user form in VBA that includes checkboxes, you may want to make the checkboxes larger. You can't adjust ...

Discover More

Formatting Footnotes and Endnotes

Footnotes and endnotes can be formatted in the same way that you format regular text in your document. There is an easier ...

Discover More

RGB Values for Automatic Colors

When you create a chart, Excel automatically assigns different colors to the various data series in the chart. At some ...

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)

Cross-Referencing Index Entries

You've probably seen an index where an entry says something like 'Obsidian: See igneous rock.' This sort of ...

Discover More

Specifying an Index Page-Range Separator

When generating an index, Word normally uses a dash to indicate page ranges. You can change the character used for these ...

Discover More

Chapter Numbers in Indexes and TOAs

Word allows you to define prefixes for page numbers. These are often used for chapter or section numbers in a large ...

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 five more than 8?

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.