Jumping to a Table Row

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


Maren has a document that has a very large table in it, spanning many pages. She would like the ability to jump to a specific row in the table, so she wonders if it is possible to use the Go To feature to jump to a particular row number, such as row 80.

The Go To dialog box (which is displayed by pressing F5 or Ctrl+G) allows you to jump to lots of different places in a document. (How you use the dialog box has been covered in other issues of WordTips.) It is actually possible for it to be used with table rows, with one huge caveat.

If your document only contains a table, you can jump to rows by following these steps:

  1. Press either F5 or Ctrl+G. Word displays the Go To tab of the Find and Replace dialog box.
  2. At the left side of the dialog box choose Line. (See Figure 1.)
  3. Figure 1. The Go To tab of the Find and Replace dialog box.

  4. Enter the row number to which you want to move. (The Next button changes to Go To.)
  5. Click on Go To, or press Enter.

This works because Word apparently considers each row in the table a "line." (It isn't affected, either, but rows that contain wrapped lines or multiple paragraphs.) This brings me to the caveat: If your document contains more than a table—especially text before the table—then the line jumping will be off because Word counts the non-table text in its line count calculations.

In that case, you'll need to use a macro to jump to the row you want. The following is an example of one that could be used.

Sub GoToTableRow()
    Dim RowNum As Integer
    Dim LastRow As Integer
    Dim Question As String

    If Selection.Information(wdWithInTable) Then
        LastRow = Selection.Tables(1).Rows.Count
        Question = "Enter a number from 1 to " & LastRow
        RowNum = InputBox(Question, 1)
        If (RowNum < 1) Or (RowNum > LastRow) Then
            MsgBox "That's an invalid row number"
            Exit Sub
        End If
        Selection.Tables(1).Rows(RowNum).Cells(1).Select
    Else
        MsgBox "Not in table"
    End If
End Sub

The macro first checks to make sure the insertion point is within a table. If so, it asks the user which row number he or she would like to jump to. Assuming that the row number is in the range of available row numbers, the row is then jumped to.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10906) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365.

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

Putting Character Codes to Work

If you know the character codes for some characters of interest, you can use those codes to do lots of tasks. This tip ...

Discover More

X-Axis Dates Lose Formatting

Excel makes it easy to copy charts from one workbook to another. Even so, copying may produce some surprising results for ...

Discover More

Top Margin Ignored when Printing

When you press the Print button in Excel, you want your worksheet to go to your printer and produce output as you expect. ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (ribbon)

Cannot Combine Two Tables

When working with tables, a common editing task is to combine two tables into one. Sometimes, though, you may run into ...

Discover More

Selecting Individual Cells in a Table

Many times, before applying formatting or doing another operation, you need to select an individual cell in a table. ...

Discover More

Suppressing a Zero in a Calculated Sum

You can use fields to calculate a sum of values in a table column. Here are two ways you can modify what the fields ...

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 two more than 7?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


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.