View Single Post
 
Old 08-29-2017, 02:29 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by sylvio View Post
Thank you, it works as expected for a single title of CCs.
When I try to adapt the code for an array of names (I need to check about 20 differently named CCs and their duplicates) using cycle For ... Next, the result is dissapointing.
For example, for two CCs named "A" with contents "1" and "2" and CCs named "B" with contents "3" and "4" the result is CCs "A" with content "12" and "B" with "3, 412". And it is expect "A" with "1, 2" and "B" with "3, 4".
What is wrong?
What is wrong is that you're not resetting StrTxt to "|" on each iteration of the loop; you currently 'StrTxt = "|"' outside the loop.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote