Active Member
Excel Tables
Power Query
August 15, 2023
Thank you so much for the code of coloring text — it is smart, efficient, elegant, and I would never have been able to do this. I also incorporated your suggestion for making the text that is colored bold and it worked great and I am loving it!.
However, I do have about 325 elements in my arrays. I can manually put these elements in the VBA code and it works, but I would prefer to have a separate worksheet with 3 columns that have MyWords, MyColors, and MakeBold elements and refer to these columns in the subroutine.
I have tried many things but my last try was inserting as follows:
Dim BoldRange As Range
Set BoldRange = Worksheets(“Products”).Range(“C2:C11”)
MakeBold = BoldRange
When I run the subroutine, I get an error the Join$(MyWords) statement.
I have attached the file.
If you can help me out, I would appreciate it.
I will continue working on it. Again, Thank you so much!!
Trusted Members
Moderators
November 1, 2018
There are quite a few issues with that code, not least the fact that you can't use text like vbRed or rgb(153,40,10) in a cell as VBA code. I suggest you alter the ProdColour cells so that you fill them with the colour you want (it will be easier to maintain too, in my opinion) and have the code pick up the fill colours instead.
Attached is a revised sample of your workbook, with the cells coloured to match the values you had typed in.
1 Guest(s)