So I have a with loop....
If I change the "For i=1 to 4000" to 5000 (to increase the search range) than I immediately get an error 6 overflow.
My research has indicated that this is because i is not called as an integer... however it clearly is?
What is it that I am missing? Unfortunately I need to have a search range larger than 4000 rows so I need to figure this out.
Code:
Dim i As Long
For i = 1 To 4000 If CalibSource.Cells(i, 1).Value = "1/2/2013" Then
CalibSource.Range(CalibSource.Cells(i, 1), CalibSource.Cells(i, 15)).Copy
CalibSh.Range("A" & CalibSh.Cells(Rows.Count, 1).End(xlUp).Row + 1).PasteSpecial Paste:=xlPasteValues
End If
Next i
If I change the "For i=1 to 4000" to 5000 (to increase the search range) than I immediately get an error 6 overflow.
My research has indicated that this is because i is not called as an integer... however it clearly is?
What is it that I am missing? Unfortunately I need to have a search range larger than 4000 rows so I need to figure this out.