I am trying to create a VBA script that will conditionally format a range of cells that contain any text string with a fill color of my choosing.
So far, I use an Excel conditional formatting rule to achieve this, and it works; however, dragging and dropping the contents of cells from one column to another causes the conditional formatting rules to become very fragmented and is quickly becoming a mess. What started out as two conditional formatting rules, one for column A and another for column B, rapidly becomes dozens of separate rules as Excel alters the "applies to" field of the rules with every copy or move of cell data.
A VBA script that is able to achieve the same thing as my conditional formatting rules would be much better as it would not be affected by moving or copying and pasting cell data. I would be able to freely drag and drop my data into the appropriate column without the underlying VBA code being affected.
Does anyone here with some basic VBA coding experience have any ideas for a simple piece of code I could use to simply change the fill color of any cells that contain any string? It would apply to cells A1:A200.
If you don't like something about my question for some reason, as David Postill did recently, please tell me in a comment and give me a few minutes to update it with whatever additional information you think may be necessary, instead of downvoting it and scurrying away.
Only interested in hearing from people with some basic VBA experience and a desire to be helpful. No snarky comments about "We are not going to debug some random script you found online for you" please. I only want to hear from positive, HELPFUL people.