Extend a macro rule for setting color and specific text
Hello,
I'm using a macro for setting a field color based on a specific text in the same cell.
Part of the Macro:
If cell.Value Like "*XXX*" Then cell.Interior.ColorIndex = 24
Question:
I want to extend my macro to check also a text which is in the same row but 2 columns before. (So the macro should be: Active cell.value like "*XXX*" and 2 columns to left cell.value "YYY" Then.......).
For another part I also want to set a specific text in the same row 2 columns to the right. (So the macro should be: Then cell.Interior.ColorIndex = 24 and 2 columns to the right set cell value "ZZZ").
Can please somebody help me out.
regards and thanks !
Johan
|