There is no Debug.print output from the following code.
There are matching values in column B of the 2 sheets.
Thanks for any help
David
There are matching values in column B of the 2 sheets.
Code:
Sub Compare_species_id()
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim cell1, cell2 As Range
Set ws1 = ThisWorkbook.Sheets("Common Species")
Set ws2 = ThisWorkbook.Sheets("All Complaints")
For Each cell1 In ws1.Range("A2:A" & Range("A2").End(xlDown).Row)
For Each cell2 In ws2.Range("A2:A" & Range("A2").End(xlDown).Row)
If cell2.Offset(0, 1).Value = cell1.Offset(0, 1).Value Then
Debug.Print " complaint memp id = " & cell2.Offset(0, 1).Value
Debug.Print " complaint berc id = " & cell1.Value
End If
Next cell2
Next cell1
End Sub
Thanks for any help
David