Forum Discussion
jamesarchant
Nov 18, 2019Copper Contributor
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...
Abiola1
Nov 18, 2019MVP
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
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