
08-29-2017, 02:29 PM
|
 |
Administrator
|
|
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
|
|
Quote:
Originally Posted by sylvio
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]
|