This code works, but I was wondering if someone would review it
Thanks
Sub TRENDCOMPARE()
Dim myRange, myRange2, wksht1, wksht2, tempPoint, countResult, resultssht As String
Application.ScreenUpdating = False
myRange = "A:A"
myRange2 = "B:B"
wksht2 = "server"
wksht1 = "panel"
resultssht = "Results"
For Each c In Worksheets(wksht1).Range(myRange).Cells
If c.Value Like "Point Name:" Then
Sheets(wksht1).Select
tempPoint = Range(c.Address).Offset(0, 1).Value
Sheets(wksht2).Select
countResult = Application.WorksheetFunction.CountIf(Range(myRange2), tempPoint)
If countResult < 1 Then
Sheets(resultssht).Select
Rows("2:2").Select
Selection.Insert Shift:=xlDown
Range("A2").Value = tempPoint
Range("A1").Select
End If
End If
Next c
Application.ScreenUpdating = True
End Sub
Bookmarks