filmov
tv
Find Last Row | Parametrization | Excel VBA For Beginners

Показать описание
How do you create a simple copy paste macro? You Go to view- Macros- Record Macro. Then Copy the data, go to the original sheet, select a cell and click paste. Only problem is, the macro won't be parameterized. What I mean is, if next time, your data has a different number of items, this macro simply won’t work. Because it was programmed to only copy the a specific number of items. How to solve this? Just use a few lines of code to fix it. First declare a variable L, which equals to the last occupied cell in the list. This will get the exact number of items in the data. Then change the range to be copied, to use this variable, instead.
Et viola ! Your macro will now work on any length of data.
#shorts #excelmacros #automation
Et viola ! Your macro will now work on any length of data.
#shorts #excelmacros #automation