ScatmanKyle
Board Regular
- Joined
- Oct 26, 2015
- Messages
- 65
- Office Version
- 365
- Platform
- Windows
I have a list of phone numbers in the sheet "Data Load", column C starting from the 3rd row. I'm trying to go down one at a time searching for those numbers in the "Lookup" tab to find how many numbers have not yet been entered into the "Lookup" tab. I put in two fake numbers into the list as a test, but my code is returning 0 as the final result for ErrCount. What am I doing wrong?
Code:
Sub NewNum()
Dim TempNum As String
Dim ErrCount As Double
Dim RowCount As Double
Set FindRange = Worksheets("Lookup").Range("A:A").Find(TempNum, , xlValues, xlWhole, xlByRows)
RowCount = 0
Sheets("Data Load").Select
Cells(3, 3).Select
Do Until IsEmpty(Cells(3 + RowCount, 3))
TempNum = ActiveCell.Offset(RowCount, 0).Value
If FindRange Is Nothing Then
ErrCount = ErrCount + 1
Else
ErrCount = ErrCount
End If
RowCount = RowCount + 1
Loop
End Sub