Written by Allen Wyatt (last updated March 15, 2021)
This tip applies to Word 2007, 2010, 2013, and 2016
Denis frequently uses tables in his documents. In those tables, he has a need to add a series of sequential numbers to the cells in the first column. Denis wonders if there is a way to pick a starting number in a cell and then have Word add the sequential numbers for all the cells under that starting number.
There are a couple of ways you could go about this. One way is to use Word's built-in numbering, in this manner:
If you want to modify the starting number for the cells, right-click the number in the first cell and then choose Set Numbering Value from the resulting Context menu. Word displays the Set Numbering Value dialog box. (See Figure 1.)
Figure 1. The Set Numbering Value dialog box.
Enter the value you want to start with, and when you click OK, Word updates the numbers in the cells. You'll also note that if you insert any rows in the middle of your numbered sequence, Word automatically adds a number to that inserted row.
Noting this behavior, you might appreciate a simple variation on the above process that works well when you are inserting a brand new table:
Another powerful way to add your numbering is to use the SEQ field. Follow these general steps:
{ SEQ table1 \r4 }
Finally, if you prefer to use a macro to insert numbers in a sequence of cells, you could use one similar to this:
Sub AddNumbersToTable() Dim RowNum As Long Dim ColNum As Long Dim iStartNum As Integer Dim J As Integer If Selection.Information(wdWithInTable) Then RowNum = Selection.Cells(1).RowIndex ColNum = Selection.Cells(1).ColumnIndex iStartNum = Val(Selection.Cells(1).Range.Text) If iStartNum <> 0 Then iStartNum = iStartNum + 1 For J = RowNum + 1 To ActiveDocument.Tables(1).Rows.Count ActiveDocument.Tables(1).Cell(J, ColNum).Range.Text = iStartNum iStartNum = iStartNum + 1 Next Else MsgBox "Cell doesn't contain a non-zero starting number." Exit Sub End If Else MsgBox "Not in table" End If End Sub
To use the macro, just put a starting sequence value into a cell of the table and leave the insertion point in that cell. When you then run the macro, all the cells under that starting cell are filled with sequential values. (Anything previously in those cells is deleted.)
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (89) applies to Microsoft Word 2007, 2010, 2013, and 2016.
Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!
Need to adjust the space between individual cells in a table? Word gives you a good deal of control over this spacing, as ...
Discover MoreNeed to make a copy of every single table in a document? There's a quick and easy way to do it using the macro in this tip.
Discover MoreNeed to add a sum to a column of figures in a table? Word makes it relatively easy to provide the sum you need.
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2019-10-29 13:45:07
Jen
Hello! I have a table in Word with a number sequence where the highest number is in the top row. When I add a row above the top row, is there a way to automatically number the appropriate cell with one number higher in the sequence? Thanks!
2019-06-05 02:32:41
Alexander Angelov
Thank you Allen, from the heart ... and from Bulgaria :)
2019-03-28 13:17:43
Robin
What I wanted to do was to make a table listing numbered, one-use key tags and these numbers were seven digits long (but sequential!) Word doesn't allow me to start numbering at "0478741" using the built-in numbering feature. I couldn't get the second option to work at all, even though I followed your instructions carefully. I tried Excel to do the numbering, but then couldn't get an Excel file to convert into a nice printed Word document.
2017-04-24 04:22:50
Ken Endacott
An easier way is to setup the table in Excel and use the Excel features to create sequential numbering. The cells making up the whole table can then be selected and copied into a Word document using CTRL/C and CTRL/V which will create a table in Word. Column widths and borders can be set up in Excel and cells can be filled in before copying to the Word document.
If the table already exists then select the table, copy to Excel, setup the numbering and copy the table back to Word.
As well as sequential numbers, Excel can create sequential dates and perform arithmetic on the cell contents.
2017-04-23 07:16:54
Debby D.
For years, I've applied an autonumbered style to the first cell I want to be sequentially numbered. When I add rows, the cells immediately below continue that same numbered style whether I add them by tabbing from the end of the last row or by using the commands to inserts rows above or below. Because the numbering is part of a style, it can continue from one table to another, but it can always be restarted. I can even skip a row by changing the style for the particular cell or by just toggling off the numbering. I also use it to show two levels of numbering in a single cell by creating two autonumbered styles in a hierarchy that works just like Heading 1 and Heading 2.
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments