@ AB33,
Nice work! To select single Cells, I have replaced EntireRow with Cells, and copied the results to Column D instead of Column A. I have also added Option Explicit and Dim NR as Integer, in both subs, which makes the Project more robust.
If akulka58 wants to select single Cells instead, this Code should suffice.
Option Explicit
Sub find_events()
Dim c2 As Range, c As Range, LR As Long, um As Worksheet, NR As Integer
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.Cells.Interior.Color = vbRed
c.Cells.Copy um.Cells(NR, 4)
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, NR As Integer
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.Cells.Interior.Color = vbGreen
c.Cells.Copy um.Cells(NR, 4)
NR = NR + 1
End If
End If
Next
End With
Application.ScreenUpdating = 1
Application.EnableEvents = 1
End Sub
Hope you don't mind.
Happy Holidays, and a Merry Christmas to you Guys!
Bookmarks