DixieDiver,
I had set the workbook names the other way around. Retry the below code? I've changed the route from Missing Tags > DB now
Option Explicit
Option Compare Text
Sub HighLightText()
Dim i As Integer, counter As Integer, ExportWb As Object, ImportWb As Object, lr As Range
i = 1
counter = 1
Set ImportWb = Workbooks("DB (Old App).xlsx").Sheets("DB (Old App)").Cells
Set ExportWb = Workbooks("Missing PI Tags 20141021b.xlsx").Sheets("Jacobs").Cells
Set lr = Workbooks("DB (Old App).xlsx").Sheets("DB (Old App)").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
Do While i < 501
Do While counter < lr.Row + 1
If ExportWb(i, 1).Value = ImportWb(counter, 1).Value Then
ImportWb(counter, 1).Interior.ColorIndex = 6
End If
counter = counter + 1
Loop
counter = 1
i = i + 1
Loop
MsgBox ("The task has been completed"), vbInformation
End Sub
Bookmarks