I am working with arrays now and the IF statement is judging wrong. I resumed my code:
Sub Reset()
Nr=6
Dim X, Y, MinX, AM, NX, W As Double
Y=200,00
AM=5,00
ReDim X(Nr)
ReDim Z(Nr)
For i = 1 To NrParcelas
X(i - 1) = Y - WorksheetFunction.Sum(.Range(.Cells(2, LTi.Column + i - 1)...