I have a list of entries by row of Invoices and Payments. Each entry has a date and I need to figure out how long it took before each invoice got paid in full. Looks kinda like this: _

DATE..........TYPE.............AMT...............PMT.............BALANCE
9/18............INVOICE........339.00...................................339.00
9/20............INVOICE........103.16...................................442.16
10/6............INVOICE..........28.00...................................470.16
10/6............PAYMENT............................200.00.............270.16
10/8............INVOICE.........112.24..................................382.40
10/18...........INVOICE........308.00..................................690.40
10/26...........PAYMENT...........................300.00............390.40
10/30...........PAYMENT...........................300.00..............90.40

Example the 9/18 Invoice got paid in full by 10/26, so it took 38 days.
But how can I create a formula to do this for every invoice?

Many thanks in advance.