[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]AA[/TD]
[TD="align: center"]AB[/TD]
[TD="align: center"]AC[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Invoices[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Year[/TD]
[TD]Remaining[/TD]
[TD]Task[/TD]
[TD]Funding[/TD]
[TD]Invoice[/TD]
[TD]Task[/TD]
[TD]Fund[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2017[/TD]
[TD]3014.03[/TD]
[TD]97[/TD]
[TD]M[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]2015[/TD]
[TD]6460.71[/TD]
[TD]98[/TD]
[TD]L6[/TD]
[TD]60.71[/TD]
[TD]98[/TD]
[TD]L6[/TD]
[TD]60.71[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]2018[/TD]
[TD]580.28[/TD]
[TD]99[/TD]
[TD]F[/TD]
[TD]0[/TD]
[TD]100[/TD]
[TD]A[/TD]
[TD]5600.74[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]2019[/TD]
[TD]6956.39[/TD]
[TD]99[/TD]
[TD]F[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]2017[/TD]
[TD]5510.74[/TD]
[TD]100[/TD]
[TD]A[/TD]
[TD]5510.74[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]2018[/TD]
[TD]8737.52[/TD]
[TD]100[/TD]
[TD]A[/TD]
[TD]90[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]2019[/TD]
[TD]5000.00[/TD]
[TD]100[/TD]
[TD]A[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 550"]
<tbody>[TR]
[TD]From visible rows, I need to subtract the Invoice amount $5600.74 from the remaining funds for Task 100 Fund A until invoice is zero - recording the amount of the invoice used under the invoice column. Notice some rows are hidden as this is a filtered table.
Having a hard time writing a formula for cells in column E to handle subtracting the invoice amount until it has all been applied to the remaining funds (oldest year first). Perhaps a VBA function could handle this?
Any suggestions would be greatly appreciated.[/TD]
[/TR]
</tbody>[/TABLE]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[TD="align: center"]E[/TD]
[TD="align: center"]AA[/TD]
[TD="align: center"]AB[/TD]
[TD="align: center"]AC[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Invoices[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Year[/TD]
[TD]Remaining[/TD]
[TD]Task[/TD]
[TD]Funding[/TD]
[TD]Invoice[/TD]
[TD]Task[/TD]
[TD]Fund[/TD]
[TD]Amount[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2017[/TD]
[TD]3014.03[/TD]
[TD]97[/TD]
[TD]M[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]2015[/TD]
[TD]6460.71[/TD]
[TD]98[/TD]
[TD]L6[/TD]
[TD]60.71[/TD]
[TD]98[/TD]
[TD]L6[/TD]
[TD]60.71[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]2018[/TD]
[TD]580.28[/TD]
[TD]99[/TD]
[TD]F[/TD]
[TD]0[/TD]
[TD]100[/TD]
[TD]A[/TD]
[TD]5600.74[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]2019[/TD]
[TD]6956.39[/TD]
[TD]99[/TD]
[TD]F[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]2017[/TD]
[TD]5510.74[/TD]
[TD]100[/TD]
[TD]A[/TD]
[TD]5510.74[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]2018[/TD]
[TD]8737.52[/TD]
[TD]100[/TD]
[TD]A[/TD]
[TD]90[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]2019[/TD]
[TD]5000.00[/TD]
[TD]100[/TD]
[TD]A[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 550"]
<tbody>[TR]
[TD]From visible rows, I need to subtract the Invoice amount $5600.74 from the remaining funds for Task 100 Fund A until invoice is zero - recording the amount of the invoice used under the invoice column. Notice some rows are hidden as this is a filtered table.
Having a hard time writing a formula for cells in column E to handle subtracting the invoice amount until it has all been applied to the remaining funds (oldest year first). Perhaps a VBA function could handle this?
Any suggestions would be greatly appreciated.[/TD]
[/TR]
</tbody>[/TABLE]