I am trying to compare two columns in two separate worksheets in the same book. Worksheet 13 has two columns, columns O and P with serial numbers as does worksheet 3. What I am trying to do is if there is a serial number in worksheet 13 that also appears in worksheet 3, I want to count each time this occurrence happens. Here is my code so far. The problem I am having is that it is simply counting how many serial numbers there are and I can't use an Is Not Nothing statement. Any help would be greatly appreciated, this is driving me up a wall.
Code:
Sub countdups()
Dim UsedRowsMaster As Long
Dim UsedRowsNew As Long
Dim Master As Workbook
Dim Update As Workbook
Dim ShopOrder As String
Dim Service As String
Dim Ustring As String
UsedRowsUpdate = Worksheets(13).UsedRange.Rows.Count
'Search and match
For Each cell1 In Worksheets(13).Range("O" & "2:" & "P" & UsedRowsUpdate)
Set cell2 = Worksheets(3).Columns("O").Cells _
.Find(What:=cell1.Value, After:=Range("O1"), LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
If cell2 Is Nothing Then
GoTo Label1:
Else
counterdup = counterdup + 1
End If
Label1:
Next cell1
MsgBox counterdup
End Sub