Hi
try
Code:
Sub kTest()
Dim LastRow As Long, i As Long
Dim RSL_Data, FS_Data, r As Range
With Sheets("RSL")
LastRow = .Range("m" & .Rows.Count).End(xlUp).Row
Set r = .Range("k2:m" & LastRow)
RSL_Data = r.Value2
End With
With Sheets("FailedSpots")
LastRow = .Range("m" & .Rows.Count).End(xlUp).Row
FS_Data = .Range("l2:m" & LastRow)
End With
For i = 1 To LastRow - 1
If RSL_Data(i, 3) = FS_Data(i, 1) Then
If RSL_Data(i, 1) > FS_Data(i, 2) Then
RSL_Data(i, 1) = FS_Data(i, 2)
End If
End If
Next
r = RSL_Data
End Sub
Bookmarks