Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
PaulM
 
Posts: n/a
Default how do i count unique items in word table?

I have a software test report template, in word, that includes the severity
of the issue in a column on a table (values being A,B,C or D). Ideally I
would need a count of the A's and B's found within this table.

  #2   Report Post  
Posted to microsoft.public.word.tables
Cooz
 
Posts: n/a
Default how do i count unique items in word table?

Dear Paul,

You cannot do this in Word. I suggest you replace the table by an Excel
table - it is a piece of cake in Excel. The Standard toolbar has a button
(with a table and the Excel icon) that allows you to do so.

Succes,
Cooz
--
PS: If this is a satisfying answer to your question and you're logged in via
the Microsoft site, please click Yes to "Did this post answer the question?".
Thanks.

"PaulM" wrote:

I have a software test report template, in word, that includes the severity
of the issue in a column on a table (values being A,B,C or D). Ideally I
would need a count of the A's and B's found within this table.

  #3   Report Post  
Posted to microsoft.public.word.tables
Helmut Weber
 
Posts: n/a
Default how do i count unique items in word table?

Hi Paul,

want a programmatic solution?

Ask in ..public.word.vba.general

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
  #4   Report Post  
Posted to microsoft.public.word.tables
PaulM
 
Posts: n/a
Default how do i count unique items in word table?

Excel certainly has the functionality to sum and count better than word,
however the test reports need to be in a word format (legacy reasons).
Another option is to store the info in Access and export to Word (Not an easy
process for temp testers).

I'm not positive about 'cannot'; theres always a way, it just depends on how
messy the way is!

"Cooz" wrote:

Dear Paul,

You cannot do this in Word. I suggest you replace the table by an Excel
table - it is a piece of cake in Excel. The Standard toolbar has a button
(with a table and the Excel icon) that allows you to do so.

Succes,
Cooz
--
PS: If this is a satisfying answer to your question and you're logged in via
the Microsoft site, please click Yes to "Did this post answer the question?".
Thanks.

"PaulM" wrote:

I have a software test report template, in word, that includes the severity
of the issue in a column on a table (values being A,B,C or D). Ideally I
would need a count of the A's and B's found within this table.

  #5   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP
 
Posts: n/a
Default how do i count unique items in word table?

The following will sum the occurences of the A's, B's, C's and D's in the
second column of the first table in the document, starting from the second
row (assuming that there is a heading in the first row)

Dim A As Long, B As Long, C As Long, D As Long, i As Long
Dim arange As Range
A = 0
B = 0
C = 0
D = 0
With ActiveDocument.Tables(1).Columns(2)
For i = 2 To .Cells.Count
Set arange = .Cells(i).Range
arange.End = arange.End - 1
Select Case arange
Case "A"
A = A + 1
Case "B"
B = B + 1
Case "C"
C = C + 1
Case "D"
D = D + 1
End Select
Next i
End With
MsgBox "There are " & A & " A's; " & B & " B's; " & C & " C's and " & D & "
D's."


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"PaulM" wrote in message
...
Excel certainly has the functionality to sum and count better than word,
however the test reports need to be in a word format (legacy reasons).
Another option is to store the info in Access and export to Word (Not an
easy
process for temp testers).

I'm not positive about 'cannot'; theres always a way, it just depends on
how
messy the way is!

"Cooz" wrote:

Dear Paul,

You cannot do this in Word. I suggest you replace the table by an Excel
table - it is a piece of cake in Excel. The Standard toolbar has a button
(with a table and the Excel icon) that allows you to do so.

Succes,
Cooz
--
PS: If this is a satisfying answer to your question and you're logged in
via
the Microsoft site, please click Yes to "Did this post answer the
question?".
Thanks.

"PaulM" wrote:

I have a software test report template, in word, that includes the
severity
of the issue in a column on a table (values being A,B,C or D). Ideally
I
would need a count of the A's and B's found within this table.





  #6   Report Post  
Posted to microsoft.public.word.tables
PaulM
 
Posts: n/a
Default how do i count unique items in word table?

Many Thanks. This does the job!

"Doug Robbins - Word MVP" wrote:

The following will sum the occurences of the A's, B's, C's and D's in the
second column of the first table in the document, starting from the second
row (assuming that there is a heading in the first row)

Dim A As Long, B As Long, C As Long, D As Long, i As Long
Dim arange As Range
A = 0
B = 0
C = 0
D = 0
With ActiveDocument.Tables(1).Columns(2)
For i = 2 To .Cells.Count
Set arange = .Cells(i).Range
arange.End = arange.End - 1
Select Case arange
Case "A"
A = A + 1
Case "B"
B = B + 1
Case "C"
C = C + 1
Case "D"
D = D + 1
End Select
Next i
End With
MsgBox "There are " & A & " A's; " & B & " B's; " & C & " C's and " & D & "
D's."


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"PaulM" wrote in message
...
Excel certainly has the functionality to sum and count better than word,
however the test reports need to be in a word format (legacy reasons).
Another option is to store the info in Access and export to Word (Not an
easy
process for temp testers).

I'm not positive about 'cannot'; theres always a way, it just depends on
how
messy the way is!

"Cooz" wrote:

Dear Paul,

You cannot do this in Word. I suggest you replace the table by an Excel
table - it is a piece of cake in Excel. The Standard toolbar has a button
(with a table and the Excel icon) that allows you to do so.

Succes,
Cooz
--
PS: If this is a satisfying answer to your question and you're logged in
via
the Microsoft site, please click Yes to "Did this post answer the
question?".
Thanks.

"PaulM" wrote:

I have a software test report template, in word, that includes the
severity
of the issue in a column on a table (values being A,B,C or D). Ideally
I
would need a count of the A's and B's found within this table.




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
Word 97 in Windows XP to maintain formatting Charlie''s Word VBA questions Microsoft Word Help 22 May 20th 23 08:51 PM
Does Word have a QuickCorrect/Quick Word option like WordPerfect? CW New Users 2 December 20th 05 05:54 PM
In Word, how do I surpress headers and footers on page 2 Bill Microsoft Word Help 1 December 15th 05 06:13 PM
is word perfect compatible with office word? Noreen Microsoft Word Help 1 May 11th 05 11:17 PM
Envelope Address GR New Users 5 April 24th 05 09:48 PM


All times are GMT +1. The time now is 02:19 PM.

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

About Us

"It's about Microsoft Word"