ROW COUNTS IN TABLES

B

Brian_Humphrey

Does anybody know how to get a count on the number of rows in a table? I have a table that is approx. 203 pages long with approx 9 rows per page, but is there a way to get an exact count?

I appreciate any responses
 
M

macropod

Hi Brian,

The following macro will return the address of any cell in a table. If you select a cell on the last row and run the macro, the
address (which includes the row count) will be displayed on the status bar:

Sub CellAddress()
If Selection.Information(wdWithInTable) = True Then
If Selection.Cells(1).ColumnIndex > 26 Then
StatusBar = "Cell Address: " & Chr(64 + Int(Selection.Cells(1).ColumnIndex / 26)) & _
Chr(64 + (Selection.Cells(1).ColumnIndex Mod 26)) & Selection.Cells(1).RowIndex
Else
StatusBar = "Cell Address: " & Chr(64 + Selection.Cells(1).ColumnIndex) & _
Selection.Cells(1).RowIndex
End If
End If
End Sub

Add the macro to your Normal.dot template and you'll have it available at all times.

Cheers
 
M

macropod

Of course, this won't work with Word 2008, which doesn't support vba ...

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

macropod said:
Hi Brian,

The following macro will return the address of any cell in a table. If you select a cell on the last row and run the macro, the
address (which includes the row count) will be displayed on the status bar:

Sub CellAddress()
If Selection.Information(wdWithInTable) = True Then
If Selection.Cells(1).ColumnIndex > 26 Then
StatusBar = "Cell Address: " & Chr(64 + Int(Selection.Cells(1).ColumnIndex / 26)) & _
Chr(64 + (Selection.Cells(1).ColumnIndex Mod 26)) & Selection.Cells(1).RowIndex
Else
StatusBar = "Cell Address: " & Chr(64 + Selection.Cells(1).ColumnIndex) & _
Selection.Cells(1).RowIndex
End If
End If
End Sub

Add the macro to your Normal.dot template and you'll have it available at all times.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Does anybody know how to get a count on the number of rows in a table? I have a table that is approx. 203 pages long with approx
9 rows per page, but is there a way to get an exact count?

I appreciate any responses
 
J

John McGhie

Insert a spare column, then add numbering using Bullets and Numbering.

You can format the column and its border as Hidden so that it does not
print.


Does anybody know how to get a count on the number of rows in a table? I have
a table that is approx. 203 pages long with approx 9 rows per page, but is
there a way to get an exact count?

I appreciate any responses

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
+61 4 1209 1410, mailto:[email protected]
McGhie Information Engineering Pty Ltd
http://jgmcghie.fastmail.com.au/
Nhulunbuy, Northern Territory, Australia
 
B

Brian Humphrey

Thanks for the responses. Of course it should have occurred to me to note that I am using Word 2008 for Mac. I think the idea of creating an extra column with numbering is great.

Any additional ideas will be appreciated as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top