Hi i have started Writing a loop that will eventually copy the cells one by one depending on the if statement, i think that if i run it now, it should just do nothing even if the criteria is not met. But this does not happen, it just crashes excel instead.
Sub Test2()

i = 1
Set vCelli = Cells(i, "B")
Set vCellc = Cells(i, "C")
Set vCriti = Sheet5.Cells("3", "A")
Set vCritc = Sheet5.Cells("3", "B")
Sheet6.Cells("1", "A") = vCellc.Value
Sheet6.Cells("1", "B") = vCellc.Offset(-1, 0).Value
Do
If vCelli.Value >= vCriti.Value And vCellc.Value >= vCritc.Value Then

i = i + 1
Else

i = i + 1
End If
Loop Until vCelli = "END"

End Sub
Thats the loop
thanks for the help