Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count and show number of words in a line | Microsoft Word Help | |||
how do I count the number of section breaks in a document | Microsoft Word Help | |||
Is there a limit of words you can put in tables? | Tables | |||
How do I insert chapter number with page number in footer? | Microsoft Word Help | |||
Page numbering in footers, Outside margin, Page Number + Number of Pages | Page Layout |