Forum Discussion
Help with Macro (new to macro's)
Sully_78 Assuming you have the Developer tab active and you know how to record a macro, and how to get the Module where the macro gets recorded!
Start by recording all the steps that you want to automate. This will result in very crude VBA code, probably containing a lot of useless bits of code due to scrolling, selecting a wrong cell, jumping to another, doing nothing and then selecting yet another cell etc. The recorder literally registers every single step you take, including all your mistakes.
Then get rid of all this garbage code and see if you can still run the macro. If there is still too much clutter, or the macro crashes, just scrap it and start all over, trying to make less mistakes.
Next would be to Google around to find the bits of code you need to select and filter ranges based on logical rules rather than by cell references. The recorder will have created code that e.g. goes to Sheet1, Selects the Range $A$2:$H$300, copy it and paste in Sheet2 starting at row 510. You need to get rid of these absolute cell references, because next time the data to be copied sits in range A2:H800 or A2:H123. And then perhaps you want to paste it downwards from row 1025 (not 510), being the next empty row at that time. All doable and not very difficult. But if you need help from someone here you would have to upload and example of your workbook.