See attached.
Add a column in the All sheet (Column N) and in N5 entered formula:
=IF(A5="","",IF(K5<=TODAY()+60,MAX($N$4:N4)+1,""))
which counts the number of matches (within 60 days of today)..
formula is copied down to row 100 to accomodate future additions.. you can copy down even further.
then in Renewals sheet...in A2, use formula:
=IF(ROWS($A$2:$A2)>MAX(All!N:N),"",ROWS($A$2:$A2)) copied down to count count of rows that will be extracted... copy down as far as you want..
in B2, use formula and copy down as far as you want and across all columns...
=IF($A2="","",INDEX(All!A:A,MATCH($A2,All!$N:$N,0)))
no need for button.. live update.
Bookmarks