You'll also need to stop the row increment, otherwise you bypass anyzero rows that are consecutive.code ...While (lastrow <> 0)If /condition/ Thencode ...i=i-1End Ifi=i+1code ...Wend