|My Bad!|I'm not quite sure what you are asking for.
Obviously a formula can't "stop" a payment.
If you are trying to keep track of the payments and watch the total amount owed decrease after each payment, you could do something like this:
1 - In A1 put 3729.96
2 - In A2 put =A1-23.91
3 - Move your cursor to the bottom right of A2 until it turns into a + sign
4 - Click and drag down to autofil the column with the formula.
When you reach A138, the remaining amount on the loan should be 3.29.