Hey,

Thank you very much for you explanations. It helps a lot! The N=N1 was confusing but I have it now.

And I didn't copy every lines of the codes but it works

i = 1



NCusts = Range("A1").End(xlDown).Row - 1


Cells(2, 10).FormulaR1C1 = "=if(and(RC2<>"""",RC2<>R[-1]C2),1,"""")"
Range("J2").Select
Selection.AutoFill Destination:=Range(Selection, Selection.Offset(NCusts - 1, 0))
That was the beginning.

Have a good day!

Edmond