Forum Discussion
Excel 365 - automatically delete rows from sheet at the end of every week
Hi there,
We're using Office 365 and i've been tasked with the contents of a table within a certain sheet on an Excel spreadsheet to be deleted at the end of every week,
I had a look around and a few people seem to suggest it could be done with a vba script, which i'm unfamiliar with, but seems to be possible using Developer tools? However I can't seem to enable Developer tools on 365.
Any help appreciated.
Thanks,
James
2 Replies
- Hello,
By default the Developer tab in not visible. To have it on your tabs list,
Right-click on any of the tab such as Home, Insert etc and select Customize ribbon tab. Next you gonna see Developer tab unchecked. Just check the box and click on Add
VBA Code to Delete Rows
Let assume you want to delete records from A1:A20, you can execute the VBA code below
Sub Delete ()
Range ("A1:A20").EntireRow.Delete
End Sub - Riny_van_EekelenPlatinum Contributor
If you can do it manually, you can record the steps and create a macro in VBA (Tools, Macro ........).
But you say you are not familiar with that. Not sure what Developer Tools you refer to. There is a ribbon called "Developer" which can be made visible at will.
Please clarify your needs and upload a sample file. Indicating what needs to be deleted and based on what criteria. Then we can have a look at it.