I have the following where i need the if loop to run if the matchn functions fails. How can this be done?
Code:
spot = 1
For i = 2 To 4515
temp = Worksheets("Sheet2").Range("B" & i).Value
For n = 2 To 3130
If Not Application.Match(temp, Worksheets("Sheet1").Range("C:C"), 0) Then
Worksheets("Sheet2").Range("B" & i).Select
Selection.Copy
Worksheets("Sheet3").Range("A" & spot).PasteSpecial xlPasteValues
''Selection.Paste
Worksheets("Sheet2").Range("C" & i & ":C" & i + 1).Select
Selection.Copy
Worksheets("Sheet3").Range("B" & spot).PasteSpecial xlPasteValues, Transpose:=True
spot = spot + 1
GoTo found
End If
Next
found:
Next