I have two tables that have some intersecting values. Table one is several times longer than table two. The columns that intersect are "N" and "Q."
I want to highlight the rows in table two that have values that are in table one.
I'm not sure how to go about this though. So far I've gone down two dead end paths:
Path 1: Conditional Formatting.
If Range(Q1:Q37) = Range(N2:N147) then highlight
However it can only equal a single value at a time, and I don't care to enter 146 conditional formats. This would work if it can be programmed through VBA, but as far as I know it can't.
Path 2: A for loop within a for loop:
But I keep getting a "for without next" error message from doing it this way. I'm not sure if VBA allows for a for within a for. Perhaps a case within a for?For t = 1 To impdatalength
check = Cells(t, 17).Value
For y = 2 To datalength
If Cells(y, 14).Value <> check Then
Next
Else
Range("q" & t & ":u" & t).ColorIndex = 4
End If
Next
Bookmarks