#1   Report Post  
Posted to microsoft.public.word.tables
Derek Hart
 
Posts: n/a
Default Group By

Can I mark a table in Word to Group By the data. So it does not show
duplicate data?

Thank You,
Derek Hart


  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP
 
Posts: n/a
Default Group By

See Example 4 in the article "Finding and replacing characters using
wildcards" at:

http://www.word.mvps.org/FAQs/Genera...gWildcards.htm


--
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

"Derek Hart" wrote in message
...
Can I mark a table in Word to Group By the data. So it does not show
duplicate data?

Thank You,
Derek Hart




  #3   Report Post  
Posted to microsoft.public.word.tables
Derek Hart
 
Posts: n/a
Default Group By

I looked at example 4. I don't understand how that applies. I have a list
of 27 states, but only 4 are unique. How do I list the 4?

Derek Hart


"Doug Robbins - Word MVP" wrote in message
...
See Example 4 in the article "Finding and replacing characters using
wildcards" at:

http://www.word.mvps.org/FAQs/Genera...gWildcards.htm


--
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

"Derek Hart" wrote in message
...
Can I mark a table in Word to Group By the data. So it does not show
duplicate data?

Thank You,
Derek Hart






  #4   Report Post  
Posted to microsoft.public.word.tables
Jay Freedman
 
Posts: n/a
Default Group By

If your list is in the form of one item per paragraph, then select the
list and click Table Sort OK. This sorts them so all the
duplicates are grouped together. Then run the wildcard replacement to
remove the duplicate paragraphs. What's left will be the unique items.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 8 Jan 2006 08:43:52 -0800, "Derek Hart"
wrote:

I looked at example 4. I don't understand how that applies. I have a list
of 27 states, but only 4 are unique. How do I list the 4?

Derek Hart


"Doug Robbins - Word MVP" wrote in message
...
See Example 4 in the article "Finding and replacing characters using
wildcards" at:

http://www.word.mvps.org/FAQs/Genera...gWildcards.htm


--
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

"Derek Hart" wrote in message
...
Can I mark a table in Word to Group By the data. So it does not show
duplicate data?

Thank You,
Derek Hart





  #5   Report Post  
Posted to microsoft.public.word.tables
Derek Hart
 
Posts: n/a
Default Group By

It does not seem to replace all the duplicates unless I run it multiple
times. This is the code when I recorded a macro.

I had the following:

AZ
AZ
CA
CA
CA
CA
CA
FL
FL
GA

so I want to get

AZ
CA
FL
GA

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(*^13)\1"
.Replacement.Text = "\1"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

Am I missing something?


"Jay Freedman" wrote in message
...
If your list is in the form of one item per paragraph, then select the
list and click Table Sort OK. This sorts them so all the
duplicates are grouped together. Then run the wildcard replacement to
remove the duplicate paragraphs. What's left will be the unique items.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 8 Jan 2006 08:43:52 -0800, "Derek Hart"
wrote:

I looked at example 4. I don't understand how that applies. I have a
list
of 27 states, but only 4 are unique. How do I list the 4?

Derek Hart


"Doug Robbins - Word MVP" wrote in message
...
See Example 4 in the article "Finding and replacing characters using
wildcards" at:

http://www.word.mvps.org/FAQs/Genera...gWildcards.htm


--
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

"Derek Hart" wrote in message
...
Can I mark a table in Word to Group By the data. So it does not show
duplicate data?

Thank You,
Derek Hart









  #6   Report Post  
Posted to microsoft.public.word.tables
Jay Freedman
 
Posts: n/a
Default Group By

Hi Derek,

You're not missing anything, other than the part in the web page that
says "Repeat until nothing is found, to delete all duplicate
paragraphs in the document". The recorder isn't capable of creating a
macro that loops, so you have to add that to the code manually. Change
the line

Selection.Find.Execute Replace:=wdReplaceAll

to

Do While Selection.Find.Execute(Replace:=wdReplaceAll)
Loop

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 8 Jan 2006 16:24:18 -0800, "Derek Hart"
wrote:

It does not seem to replace all the duplicates unless I run it multiple
times. This is the code when I recorded a macro.

I had the following:

AZ
AZ
CA
CA
CA
CA
CA
FL
FL
GA

so I want to get

AZ
CA
FL
GA

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(*^13)\1"
.Replacement.Text = "\1"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

Am I missing something?


"Jay Freedman" wrote in message
.. .
If your list is in the form of one item per paragraph, then select the
list and click Table Sort OK. This sorts them so all the
duplicates are grouped together. Then run the wildcard replacement to
remove the duplicate paragraphs. What's left will be the unique items.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Sun, 8 Jan 2006 08:43:52 -0800, "Derek Hart"
wrote:

I looked at example 4. I don't understand how that applies. I have a
list
of 27 states, but only 4 are unique. How do I list the 4?

Derek Hart


"Doug Robbins - Word MVP" wrote in message
...
See Example 4 in the article "Finding and replacing characters using
wildcards" at:

http://www.word.mvps.org/FAQs/Genera...gWildcards.htm


--
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

"Derek Hart" wrote in message
...
Can I mark a table in Word to Group By the data. So it does not show
duplicate data?

Thank You,
Derek Hart






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
One Big Group Operation? W. Watson New Users 4 December 26th 05 01:45 PM
Macro Security Through IT Group Debra Ann Microsoft Word Help 3 October 19th 05 06:26 PM
Group Policy File locations rlampky Microsoft Word Help 0 September 6th 05 01:05 PM
Text box - group donna Microsoft Word Help 2 May 3rd 05 12:56 AM
Removing a group of hypertext links or all hypertext links in a document Terri Creagh Tables 5 November 9th 04 05:30 AM


All times are GMT +1. The time now is 06:34 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"