This may not be the most efficient way to solve the issue but I did the following:
Sub Macro2()
'
' Macro2 Macro
Range("H7").Select
' Identify last cell in column with value greater than $0
ActiveCell.FormulaR1C1 = _
"=SMALL(R[4]C[-1]:R[363]C[-1],COUNTIF(R[4]C[-1]:R[363]C[-1],""<=0"")+1)"
' Lookup the date of last payment
Range("G7").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[1],R[4]C:R[363]C[5],6,FALSE)"
' Copy/Paste Value to delete formula
' I did this because I needed to be able to change inputs without impacting this date.
Range("G7").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
' Delete the vlookup formula
' I did this because it was no longer necessary after inputting new data
Range("H7").Select
Application.CutCopyMode = False
Selection.ClearContents
End Sub
The data included in the attached spreadsheet is incomplete but it is enough to illustrate how the task was accomplished. Let me know if there are any suggestions for improving it. Exploring Debt Calcs.xlsm
Thanks to Pauleyb for the suggestion.
Bookmarks