These code would do much you have asked, but not everything. It onlly highlightes one sheet, but not both sheets. The find function works okay but not with large data, as the speed becomes an issue. I have also assumed , you want to colour and copy the entire row, but if you just wanted a single cell, just delete the word "Entire" from the code.
Sub find_events()
Dim c2 As Range, c As Range, LR As Long, um As Worksheet
Set um = Sheets("result unmatched")
Application.ScreenUpdating = 0
Application.EnableEvents = 0
NR = 2
With Sheets("ldn")
LR = .UsedRange.Rows.Count
For Each c In .Range("D2:D" & LR)
If Trim(c.Value) <> vbNullString Then
Set c2 = Sheets("fpl").Columns(3).Find(c.Value, , , 1)
If c2 Is Nothing Then
c.EntireRow.Interior.Color = vbRed
c.EntireRow.Copy um.Cells(NR, 1)
NR = NR + 1
End If
End If
Next
End With
Call find_events1
Application.ScreenUpdating = 1
Application.EnableEvents = 1
End Sub
Sub find_events1()
Dim c2 As Range, c As Range, LR As Long, um As Worksheet
Set um = Sheets("result matched")
Application.ScreenUpdating = 0
Application.EnableEvents = 0
NR = 2
With Sheets("ldn")
LR = .UsedRange.Rows.Count
For Each c In .Range("D2:D" & LR)
If Trim(c.Value) <> vbNullString Then
Set c2 = Sheets("fpl").Columns(3).Find(c.Value, , , 1)
If Not c2 Is Nothing Then
c.EntireRow.Interior.Color = vbGreen
c.EntireRow.Copy um.Cells(NR, 1)
NR = NR + 1
End If
End If
Next
End With
Application.ScreenUpdating = 1
Application.EnableEvents = 1
End Sub
Bookmarks