I had a few classes of VBA over 10 years ago. Since then it changed a bit and I totally forgot how to do even the basic stuff.
I have a project at University and I would like to automate a process using VBA with Excel 2016/2017.
I get a huge Excel table from an application. From those columns I only need a couple of them based on the column name and I want to select the ones that interest me and erase the ones that don't.
I thought about a couple ways of achieving it:
- Search all the columns with loop and copy them to a new Sheet
- Just erase the columns that don´t interest me.
I tried different options with if and case statements but my "VBA Grammar" and knowledge are horrible. Does anyone have any tips?
Table example:
A | B | C | D | E |
---|---|---|---|---|
Customer | Product | Age | Data | Color |
John | something | 3 | x | blue |
Sheet 1
If I am only Interested in the Customer, Product and Color, how can I automate the whole process?
Thanks in advance for any tips or code snippets that could help me :)