Excel Coding and Conditional Formatting

Copper Contributor

I am trying to make a code where if a specific work is in column f it will change any number greater than 0 to red in specific columns within the same row as the word.


For example Cell F6 says Cat

Cells H6 and M6 have the number 3 and the rest of the cells in that row are blank or 0

I would want this code to change H6 and M6 to red only.


Phrases in Colum F change and may not be in the same row each time. I have to make this code for 50+ keywords 

1 Reply


This is the rule for conditional formatting in the screenshot. The keywords can be entered in range A2:A50.


This is the range the conditional format applies to.



Does the screenshot show your expected result?

conditional formatting.JPG