I just don't understand the Find method properly. I think. What I am looking for is the Row number at which point the Find method produces a match. The find method is inside a loop setting up a comparison between two ranges on separate sheets, my goal is to capture both the source row and the target row at which a match is found
Code:
Sub SeekFindCopy()
Dim sourceValue As Variant
Dim resultOfSeek As Range
Dim targetRange As Range
LastRow = Sheets("SAP").Range("B" & Rows.Count).End(xlUp).Row
xMlastRow = Sheets("XM").Range("B" & Rows.Count).End(xlUp).Row
Set targetRange = Sheets("XM").Range("B:B")
For sRow = 4 To LastRow
Debug.Print ("sRow is " & sRow)
sourceValue = Sheets("SAP").Range("B" & sRow).Value
Set resultOfSeek = targetRange.Find(what:=sourceValue, After:=targetRange(1))
Operations = Sheets("SAP").Cells(sRow, "A")
If resultOfSeek Is Nothing Then
If Operations = "PROCESS" Then
End If
Else
If Operations = "CHANGED" Then
[B]' At this point I want to get the row number of the targetRange in which the match occurred.[/B]
ElseIf Operations = "PROCESS" Then
End If
End If
Next sRow
End Sub