You can delete the entire row and/or columns and/or just clear the cells much quicker automatically than manually, particularly, if you have to do it many times during the month but if you are doing this task once a year, forget about it.
When I use the macro ?
When I extract data from a program or from an intranet webpage, for instance, some data are merged in many columns and I need to delete those unnecessary columns.
How to create the macro ?
Read How to create, edit, hide and select a macro in an excel report
How to create the button to associate it with the macro ?
Read How to create a button and associated it to a macro in an excel report
How is the macro ?
Copy the code below and paste it into your macro. You will see my comments in green if exist so follow the help to adapt to your need.
To delete columns:
Sub test()
' delete entire columns C and from E to G
ActiveSheet.Range("C:C,E:G").EntireColumn.Delete
End Sub
To delete rows:
Sub test()
' delete entire rows from row 2 to row 50
ActiveSheet.Range("A2:A50").EntireRow.Delete
End Sub
To clear contents:
Sub test()
' delete all data in cells from A2 to G50
ActiveSheet.Range("A2:G50").ClearContents
End Sub
When you are managing a team, “how to be a good manager” is the “must”...
As manager, I am doing many reports, even when I was an ITIL consultant, I still needed to do many reports...
ITIL V3 is going to be obsolete...
Managing an IT service when I start a new company is not an easy task, particularly true, if the service...