How to update functions automatically to include added rows of data?

I want to paste more rows into my table and have the last value in my rows update automatically.

In this function
=SUMPRODUCT(YEAR(Totalkonto.A2:A438)=2017,MONTH(Totalkonto.A2:A438)=4,Totalkonto.D2:D438)
I want the a value to increment or be infinite to always include all the rows.

Hello Quickbudg,
you could set the “a value” to 1048576, being the maximum number of rows in Calc.