September 25, 201114 yr I'm not sure how to approach this. I see I can use patterncount to count on a single string, but not any (is valid?). Within a given text string, I want to substitute "A" for every Nth occurrence of any whole word matching an item in list "B". Example: He walked to the store, checked his pocket and realizing he forgot his wallet, he groaned. result Bob walked to the store, checked his pocket and realizing he forgot his wallet, Bob groaned. List in B, count any of: He he his His A= Bob
September 25, 201114 yr I believe this will require a custom function. every Nth occurrence of any whole word matching an item in list What is N in your example? You are replacing the first and the fourth occurrence - that's already not consistent with "every Nth occurrence", whatever N may be.
September 25, 201114 yr Author Yes, planning to be a CF. "First" could be handled separately so not important.
Create an account or sign in to comment