I Need to compare Column B
in Sheet 2
with Column C
in Sheet 3
and highlight the cells with matching data in Column B (Sheet 2)
.
Have used the following formula in Conditional Formatting
which works =NOT(ISNA(VLOOKUP(Sheet3!C,Sheet2!B,1,FALSE)))
with Format type being a
particular color say Yellow Interior.colorindex = 6
How to implement the same using code in VBA?
you can do it like this
the code checks all cells in Sheet2 column B against each cell from Sheet3 column C and if they match it highlights cells on Sheet2 in Column B in yellow
I would do it this way: