Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
drybones
 
Posts: n/a
Default How to count number of rows~

Have a 7 page, single rowed, one line per row, Table.
Word 2002.
Is there a way to get word to count the rows?

Many thanks,
drybones


  #2   Report Post  
Posted to microsoft.public.word.newusers
JoAnn Paules [MVP]
 
Posts: n/a
Default How to count number of rows~

I know how *I* would do it but it may not bean option to you.

I'd copy the table and paste it in to an Excel spreadsheet. Those numbered
rows come in handy. :-)

(You may laugh at me but it works and it's a lot easier than counting!)

--

JoAnn Paules
MVP Microsoft [Publisher]



"drybones" wrote in message
...
Have a 7 page, single rowed, one line per row, Table.
Word 2002.
Is there a way to get word to count the rows?

Many thanks,
drybones



  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor
 
Posts: n/a
Default How to count number of rows~

If you sort out the prematurely wrapped lines, the Table Cell Helper as
supplied with some versions of Word in macros8.dot (and reproduced below)
will identify the location of any cell in a table and give the number of
lines. See http://www.gmayor.com/installing_macro.htm

Sub TableCellHelper()
'************************************
'* Declarations *
'* Section *
'************************************

Dim TC%, TR%, FC%, LC%, FR%, LR%, dummy%, Row%, Col%
Dim FTC&, LCT&
Dim Q1Dbl$, Q2Dbl$
Dim Msg1$, Msg2$, Msg3$, Msg4$, Msg5$, Msg6$, Title$

'************************************
'* Initialization *
'* Section *
'************************************

Msg3$ = "Your selection must be entirely within a single table."
Msg6$ = "Word cannot display the total columns and or rows because some
cells are either split or merged."
Title$ = "Table Cell Helper"

If Application.Documents.Count Then
If Selection.Information(wdWithInTable) Then
Col = Selection.Information(wdMaximumNumberOfColumns)
Row = Selection.Information(wdMaximumNumberOfRows)
FC = Selection.Information(wdStartOfRangeColumnNumber)
LC = Selection.Information(wdEndOfRangeColumnNumber)
FR = Selection.Information(wdStartOfRangeRowNumber)
LR = Selection.Information(wdEndOfRangeRowNumber)
FCT = FC / 26
Select Case FCT
Case 0 To 1
Q1Dbl = ""
Case Is = 2
Q1Dbl = "A"
FC = FC - 26
Case Else
Q1Dbl = "B"
FC = FC - 52
End Select
LCT = LC / 26
Select Case LCT
Case 0 To 1
Q2Dbl = ""
Case Is = 2
Q2Dbl = "A"
LC = LC - 26
Case Else
Q2Dbl = "B"
LC = LC - 52
End Select
Msg1$ = "At cell " & Q1Dbl & Chr$(Val(FC) + 64) & ":" & LR & "."
Msg2$ = "Selected cell range is " & Q1Dbl & Chr$(Val(FC) + 64) & FR
& ":" & Q2Dbl & Chr$(Val(LC) + 64) & LR & "."
Msg5$ = "There are a total of " & Col & " columns, and " & Row & "
rows in this table."
If FC = LC And FR = LR Then
dummy = MsgBox(Msg1$ & " " & Msg5$, vbOKOnly, Title$)
Else
dummy = MsgBox(Msg2$ & " " & Msg5$, vbOKOnly, Title$)
End If
Else
dummy = MsgBox(Msg3$, vbOKOnly, Title$)
End If
On Error GoTo TError
End If
Exit Sub

TError:
If Err = 5992 Then
dummy = MsgBox(Msg6$, vbOKOnly, Title$)
End If
Resume Next
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



drybones wrote:
Have a 7 page, single rowed, one line per row, Table.
Word 2002.
Is there a way to get word to count the rows?

Many thanks,
drybones



  #4   Report Post  
Posted to microsoft.public.word.newusers
drybones
 
Posts: n/a
Default How to count number of rows~

Many thanks to both, Graham and J0Ann for your helpful replies.

Will give JOAnn's a go and then Graham's.

drybones


"Graham Mayor" wrote in message
...
If you sort out the prematurely wrapped lines, the Table Cell Helper as
supplied with some versions of Word in macros8.dot (and reproduced below)
will identify the location of any cell in a table and give the number of
lines. See http://www.gmayor.com/installing_macro.htm

Sub TableCellHelper()
'************************************
'* Declarations *
'* Section *
'************************************

Dim TC%, TR%, FC%, LC%, FR%, LR%, dummy%, Row%, Col%
Dim FTC&, LCT&
Dim Q1Dbl$, Q2Dbl$
Dim Msg1$, Msg2$, Msg3$, Msg4$, Msg5$, Msg6$, Title$

'************************************
'* Initialization *
'* Section *
'************************************

Msg3$ = "Your selection must be entirely within a single table."
Msg6$ = "Word cannot display the total columns and or rows because some
cells are either split or merged."
Title$ = "Table Cell Helper"

If Application.Documents.Count Then
If Selection.Information(wdWithInTable) Then
Col = Selection.Information(wdMaximumNumberOfColumns)
Row = Selection.Information(wdMaximumNumberOfRows)
FC = Selection.Information(wdStartOfRangeColumnNumber)
LC = Selection.Information(wdEndOfRangeColumnNumber)
FR = Selection.Information(wdStartOfRangeRowNumber)
LR = Selection.Information(wdEndOfRangeRowNumber)
FCT = FC / 26
Select Case FCT
Case 0 To 1
Q1Dbl = ""
Case Is = 2
Q1Dbl = "A"
FC = FC - 26
Case Else
Q1Dbl = "B"
FC = FC - 52
End Select
LCT = LC / 26
Select Case LCT
Case 0 To 1
Q2Dbl = ""
Case Is = 2
Q2Dbl = "A"
LC = LC - 26
Case Else
Q2Dbl = "B"
LC = LC - 52
End Select
Msg1$ = "At cell " & Q1Dbl & Chr$(Val(FC) + 64) & ":" & LR & "."
Msg2$ = "Selected cell range is " & Q1Dbl & Chr$(Val(FC) + 64) & FR
& ":" & Q2Dbl & Chr$(Val(LC) + 64) & LR & "."
Msg5$ = "There are a total of " & Col & " columns, and " & Row & "
rows in this table."
If FC = LC And FR = LR Then
dummy = MsgBox(Msg1$ & " " & Msg5$, vbOKOnly, Title$)
Else
dummy = MsgBox(Msg2$ & " " & Msg5$, vbOKOnly, Title$)
End If
Else
dummy = MsgBox(Msg3$, vbOKOnly, Title$)
End If
On Error GoTo TError
End If
Exit Sub

TError:
If Err = 5992 Then
dummy = MsgBox(Msg6$, vbOKOnly, Title$)
End If
Resume Next
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



drybones wrote:
Have a 7 page, single rowed, one line per row, Table.
Word 2002.
Is there a way to get word to count the rows?

Many thanks,
drybones





  #5   Report Post  
Posted to microsoft.public.word.newusers
JoAnn Paules [MVP]
 
Posts: n/a
Default How to count number of rows~

I hope it works for you. :-)

--

JoAnn Paules
MVP Microsoft [Publisher]



"drybones" wrote in message
...
Many thanks to both, Graham and J0Ann for your helpful replies.

Will give JOAnn's a go and then Graham's.

drybones


"Graham Mayor" wrote in message
...
If you sort out the prematurely wrapped lines, the Table Cell Helper as
supplied with some versions of Word in macros8.dot (and reproduced below)
will identify the location of any cell in a table and give the number of
lines. See http://www.gmayor.com/installing_macro.htm

Sub TableCellHelper()
'************************************
'* Declarations *
'* Section *
'************************************

Dim TC%, TR%, FC%, LC%, FR%, LR%, dummy%, Row%, Col%
Dim FTC&, LCT&
Dim Q1Dbl$, Q2Dbl$
Dim Msg1$, Msg2$, Msg3$, Msg4$, Msg5$, Msg6$, Title$

'************************************
'* Initialization *
'* Section *
'************************************

Msg3$ = "Your selection must be entirely within a single table."
Msg6$ = "Word cannot display the total columns and or rows because some
cells are either split or merged."
Title$ = "Table Cell Helper"

If Application.Documents.Count Then
If Selection.Information(wdWithInTable) Then
Col = Selection.Information(wdMaximumNumberOfColumns)
Row = Selection.Information(wdMaximumNumberOfRows)
FC = Selection.Information(wdStartOfRangeColumnNumber)
LC = Selection.Information(wdEndOfRangeColumnNumber)
FR = Selection.Information(wdStartOfRangeRowNumber)
LR = Selection.Information(wdEndOfRangeRowNumber)
FCT = FC / 26
Select Case FCT
Case 0 To 1
Q1Dbl = ""
Case Is = 2
Q1Dbl = "A"
FC = FC - 26
Case Else
Q1Dbl = "B"
FC = FC - 52
End Select
LCT = LC / 26
Select Case LCT
Case 0 To 1
Q2Dbl = ""
Case Is = 2
Q2Dbl = "A"
LC = LC - 26
Case Else
Q2Dbl = "B"
LC = LC - 52
End Select
Msg1$ = "At cell " & Q1Dbl & Chr$(Val(FC) + 64) & ":" & LR & "."
Msg2$ = "Selected cell range is " & Q1Dbl & Chr$(Val(FC) + 64) &
FR & ":" & Q2Dbl & Chr$(Val(LC) + 64) & LR & "."
Msg5$ = "There are a total of " & Col & " columns, and " & Row & "
rows in this table."
If FC = LC And FR = LR Then
dummy = MsgBox(Msg1$ & " " & Msg5$, vbOKOnly, Title$)
Else
dummy = MsgBox(Msg2$ & " " & Msg5$, vbOKOnly, Title$)
End If
Else
dummy = MsgBox(Msg3$, vbOKOnly, Title$)
End If
On Error GoTo TError
End If
Exit Sub

TError:
If Err = 5992 Then
dummy = MsgBox(Msg6$, vbOKOnly, Title$)
End If
Resume Next
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



drybones wrote:
Have a 7 page, single rowed, one line per row, Table.
Word 2002.
Is there a way to get word to count the rows?

Many thanks,
drybones









  #6   Report Post  
Hoverer Hoverer is offline
Junior Member
 
Posts: 1
Default

If you can temporarily edit the document add a column select it and auto number. Scroll to the bottom and read the last number. It may not be the most elegant solution but it will get the job done.

Beware of header rows or if you have merged rows.


Quote:
Originally Posted by drybones View Post
Have a 7 page, single rowed, one line per row, Table.
Word 2002.
Is there a way to get word to count the rows?

Many thanks,
drybones
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
count and show number of words in a line Ambrq Microsoft Word Help 0 November 23rd 05 04:25 AM
how do I count the number of section breaks in a document LouP Microsoft Word Help 5 October 31st 05 03:20 PM
Is there a limit of words you can put in tables? lkwink Tables 4 October 16th 05 03:15 PM
How do I insert chapter number with page number in footer? Joan Microsoft Word Help 4 May 9th 05 04:00 PM
Page numbering in footers, Outside margin, Page Number + Number of Pages Eric G Page Layout 6 April 22nd 05 12:28 PM


All times are GMT +1. The time now is 08:12 PM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"