I created a loop that works. Problem is that it needs to go across about 66 columns and then go down about 2000+ lines. I think there has got to be a way to make it go faster but I'm not seeing it. Anyone have any suggestions?
Quick Notes: It starts in Column A. It needs to apply the same payment amount going across until the balance is less than the payment and then start putting zeros.
Thanks
Quick Notes: It starts in Column A. It needs to apply the same payment amount going across until the balance is less than the payment and then start putting zeros.
Code:
Do Until ActiveCell.Value = ""
pymt = ActiveCell.Offset(0, 3).Value
balance = ActiveCell.Offset(0, 4).Value
c = 5
Do Until c = 71
If balance > pymt Then
ActiveCell.Offset(0, c).Value = pymt
c = c + 1
balance = balance - pymt
ElseIf balance = 0 Then
ActiveCell.Offset(0, c).Value = 0
c = c + 1
Else
ActiveCell.Offset(0, c).Value = balance
balance = 0
c = c + 1
End If
Loop
ActiveCell.Offset(1, 0).Select
Loop