Hello everybody,

I have one big/small problem. I have 6 columns and approximately 208489 rows. I want that the second rows match criteria between the first row and if it match, put in the column 7 marks "OK" or "NOK" if don't match the criteria, than the third row will check for criteria between the previous "OK" rows, fourth row will check also the criteria between the previous "OK" roes and etc.

The criteria is the difference in just one column between every OK rows must be 2 (it's not important in which column, only one column must match the criteria).

1 A B C D E F OK/NOK
----------------------
2 1 1 2 1 3 5 OK---------First rows is starting point and it's marked as OK
3 1 1 2 1 3 6 NOK--------In column F the difference between row 3 and row 2 is 1
4 1 1 2 1 3 7 OK---------In column F the difference between row 4 and row 2 is 2
5 1 1 2 1 3 8 NOK--------In column F the difference between row 5 and row 4 is 1
6 1 1 2 1 4 5 NOK--------In column F the difference between row 6 and row 2 is 1
7 1 1 2 1 4 6 NOK--------...
8 1 1 2 1 4 7 NOK
9 1 1 2 1 4 8 NOK
10 1 1 2 1 4 9 OK
11 1 1 2 1 5 3 OK
12 1 1 2 1 5 4 NOK
13 1 1 2 1 5 6 OK
14 1 1 2 1 5 7 NOK
15 1 1 2 1 5 8 OK--------...
16 1 1 2 1 5 9 NOK---------------In column E the difference between row 16 and row 10 is 1

Does somebody know how to do this for every 208587 rows in excel.

Thank you and have a nice day