Great macro, Paul, as always.
While testing the code I wrote and the one you posted, I found that my code gives wrong results. If the number of words before the search string is 4, then my code gives 5. If the number is 25, it gives 27. And the margin of error increases, with increasing number of words before the search string.Your code, on the other hand, is perfect.
What is it that I am doing wrong? Thanks in advance.
|