SOLVED

VBA to delete rows older than 14 days

Copper Contributor

Hello, 

 

Who can help me with the following.

I have a list of users. New users are being added daily to the list. Old users that have been added 14 days ago must be deleted.

 

Is there some smart solution to delete these users by applying VBA code?

 

Kind regards,

Guram

2 Replies
best response confirmed by Guram_Bregadze (Copper Contributor)
Solution

Hi @Guram_Bregadze 

 

(I don't do VBA) Assuming you run Excel 2021 or 365, an alternative:

 

Sans titre.png

in E4:

=FILTER(TableUsers, TableUsers[Date Added] >= TODAY()-14)

 

Hello @L z.

Thank you for your efforts, but I need more like VBA solution to attach a button to it.

Best regards,
Guram
1 best response

Accepted Solutions
best response confirmed by Guram_Bregadze (Copper Contributor)
Solution

Hi @Guram_Bregadze 

 

(I don't do VBA) Assuming you run Excel 2021 or 365, an alternative:

 

Sans titre.png

in E4:

=FILTER(TableUsers, TableUsers[Date Added] >= TODAY()-14)

 

View solution in original post