The code below highlights the Row on the WIP-Summary sheet if a Value match is found on the WIP-MAIN sheet. Which highlights all the rows on the WIP-SUMMARY sheet. Because the summary is based off the main.
Is there away to modify this code that it highlights the Row on the WIP-Summary sheet if a Value match is found on the WIP-MAIN sheet but also the cell interior color on the WIP-MAIN sheet has a cell Interior.Color = RGB(166, 166, 166). So now only certain rows will be highlighted on the summary sheet instead of all of them.
Is there away to modify this code that it highlights the Row on the WIP-Summary sheet if a Value match is found on the WIP-MAIN sheet but also the cell interior color on the WIP-MAIN sheet has a cell Interior.Color = RGB(166, 166, 166). So now only certain rows will be highlighted on the summary sheet instead of all of them.
VBA Code:
Sub RunMe()
Dim lRow1, lRow2, x As Integer
Windows("ServiceFile.xlsm").Activate
lRow2 = Sheets("WIP-Main").Range("C" & Rows.Count).End(xlUp).Row
Sheets("WIP-Summary").Activate
lRow1 = Range("C" & Rows.Count).End(xlUp).Row
x = 1
For Each cell In Range("C2:C" & lRow1)
Do
x = x + 1
If cell.Value = Sheets("WIP-MAIN").Cells(x, "C") Then
Rows(cell.Row).Interior.Color = RGB(166, 166, 166)
End If
Loop Until x = lRow2
x = 1
Next cell
End Sub