Actually, thinking about it, I have made a slight mistake in the INDEX part of the original formula. Apologies - it should be:

=IF(N2>=INDEX(A2:L2,1,MATCH(MAX(A6:L6),A6:L6,0)),1000,2000)

In your original post you said that cells A6:L6 generate a 0 or 1, with only one of those cells containing 1. This is why I used the MAX function to pick out the column with the value of 1 (this being the maximum value in the range).

When you say '...want to match the cell for generation of value 5', do you mean that only one cell in the range A6:L6 will have the value 5, and all other cells in the range will any other integer values other than 5? Could these cells also have values of greater than 5?

If so, then this formula should work:

=IF(N2>=INDEX(A2:L2,1,MATCH(5,A6:L6,0)),1000,2000)

If my assuption above is not correct, please post a sample of your new data as per your original post, and I'll see what I can do for you.

Regards

Chris