Lets use the DateDif function to help out on this.
In this case, I've used Column I as a temporary helper column into which I've temporarily inserted the following formula:-
This will give us the number of days between today and when the next maintenance is due.
Hence, added to my previous code, the modified code will look like this:-
Dim lr As Long
Application.ScreenUpdating = False
lr = Tabelle1.Range("F" & Rows.Count).End(xlUp).Row
Tabelle1.Range("I6:I" & lr) = "=IF(F6<TODAY(),"""",DATEDIF(TODAY(),F6,""D""))"
.AutoFilter 9, "<=14"
Tabelle2.Range("A" & Rows.Count).End(3)(2).PasteSpecial xlValues
Tabelle2.Range("A2", Tabelle2.Range("I" & Tabelle2.Rows.Count).End(xlUp)).Sort Tabelle2.[I2], 1
Application.CutCopyMode = False
Application.ScreenUpdating = True
Hence, the code will determine which tasks are due now and within fourteen (14) days and then transfer the relevant rows of data to Tabelle2. In Tabelle2, I've added Column I to show the number of days remaining (within the fourteen days) until the next maintenance task is due.
Column I in Tabelle1 is then cleared.
Here is the link to the updated sample:-
I hope this helps.