Isaac
Lifelong Learner
- Local time
- Today, 15:18
- Joined
- Mar 14, 2017
- Messages
- 8,777
Anyone who can help me with this gets a gold star! So I have this code that works perfectly - on some cells - to colorize parts of the cell. On other cells, when you run the code all together, it incorrectly colorizes the ENTIRE cell (rather than just the words that I expect it to).
Frustratingly enough, if I step through the code line by line, it works fine. The If Instr(..... portion recognizes what it's supposed to and it skips over the words it's supposed to.
The logic is simple: For every cell in A4 and below: for every chunk of text (array split by a space), see if that text exists in A1. If it does, colorize it red.
Works perfectly if I step thru it line by line. Doesn't work on, for example, line 13 or 48, if run all at once. I hope I have not hit up against something unsolvable!! File attached
Frustratingly enough, if I step through the code line by line, it works fine. The If Instr(..... portion recognizes what it's supposed to and it skips over the words it's supposed to.
The logic is simple: For every cell in A4 and below: for every chunk of text (array split by a space), see if that text exists in A1. If it does, colorize it red.
Works perfectly if I step thru it line by line. Doesn't work on, for example, line 13 or 48, if run all at once. I hope I have not hit up against something unsolvable!! File attached