The only manual portion is entering the data into columns A:E.
I suggest converting that data into an Excel table. In the attached file I named it tbl_Data.
1. Use structured references in the formulas in the green sections.
For "Koop":
Formula:
=IFERROR(INDEX(tbl_Data,AGGREGATE(15,6,(ROW(tbl_Data[Datum])-ROW(tbl_Data[#Headers]))/(tbl_Data[[Actie]:[Actie]]="Koop"),ROWS(G$11:G11)),MATCH(G$10,tbl_Data[#Headers],0)),"")
For "Verkoop":
Formula:
=IFERROR(INDEX(tbl_Data,AGGREGATE(15,6,(ROW(tbl_Data[Datum])-ROW(tbl_Data[#Headers]))/(tbl_Data[[Actie]:[Actie]]="Verkoop"),COLUMNS($L6:L6)),MATCH($K6,tbl_Data[#Headers],0)),"")
2. Modify the calculation matrix section (blue):
Formula:
=IF(OR($G11="",L$6=""),"",MIN($I11-SUM($K11:K11),L$8-SUM(L$10:L10)))
3. Move the summations to rows 1:4 so that they will be easily visible.
4. Cell L4 is populated using:
Formula:
=SUM(L3:INDEX(L3:XFD3,AGGREGATE(15,6,(COLUMN(L3:XDF3)-COLUMN(K3))/(L3:XFD3=""),1)-1))
To extend tbl_Data select cell E34 and press the Tab key.
The "Koop" green section is extended down to row 100. If you need to extend further then select cells G100:J100 and drag the fill handle down.
The "Verkoop" green section is extended across to column BZ. I you need to extend further then select BZ6:BZ9 and drag the fill handle to the right.
The summation section (amber) is extended to column BZ. I you need to extend further then select BZ1:BZ3 and drag the fill handle to the right.
The calculation matrix section is also extended and may be extended further by selecting L11:BZ100 and then dragging the fill handle down and over.
Let us know if you have any questions.
As to tax help, if you should someday find a person that is in need, consider this their payment.
Bookmarks