For BEGINNERS: Using and Creating MACROS in Excel

Опубликовано: 31 Май 2021
на канале: SWAK Academy - Investing Simplified
52
6

Recording Marcro - Automate Tasks - Run and Activate Macros - Manage and Edit Macros - Multiple Macros - Relative and Absolute Cell References - Saving and Opening a Document with Macros.

⌚ Timestamps
00:00 - Introduction
00:40 - Demonstration - How to Record
03:37 - Use and Activate a Macro
05:06 - Assign Macros to Shapes, Pictures and form Controls
06:08 - Relative vs Absolute Cell References
07:22 - Saving and Reopening the Excel File

************************************

Check my other Excel Videos in this Playlist:
   • 👍  EXCEL ADVANCED FILTER - MULTIPLE C...  

*********Video Description******

Every one of us deals with repetitive tasks in our private life or our Job.
Applying a Recorded Macro is a great way to automate these repetitive tasks and finish them with one click.
In this Video, I am going to show you how to record a macro in Excel, even as a complete beginner. Afterward, we will discuss different methods to run and activate a Macro, How to Manage and Edit one or multiple Macros,
The difference between Relative and Absolute Cell References, and then changes that happen to the document when saving and reopening it.
Let´s get started.
****
Before we start recording a Macro, you have to activate the Developer Tab which by Default is hidden in Excel. Right, Click on the Ribbon, choose the customize Ribbon Option. Make sure that the Main Tabs option is selected in the Dropdown list. Click the Checkmark next to the developer Tab.
Then press Ok when you are finished. Since it is already selected in my Case. I will click cancel.

****
Go to the Developer Tab - On the Top Left in the Code section. Click on Record Macro Button. A pop-up window will appear.
Now i will name my macro: My First Macro and Press Enter.
Excel Will Complain. In the Pop Up Window, 3 conditions for Naming Macros are Mentioned.

1 - Start with a letter or Underscore. which also Means Starting with Numbers will cause an Issue.
2 - Spaces in the name are not allowed.
You can remove them or replace them with an Underscore.
and 3 -The Macro Name Does not Conflict with a name in the Workbook.

I will Click Ok.
Excel Takes Me Back to the Macro Name.
So Now Enter a New Macro Name without space.
Type In MyFirst_Macro.
The Capital letters Help to differentiate the Words and Underscore is a Good Replacement for Space between words.
In this Pop Up Window, we have further important Options. leave them for now.
We will get back to them in the next section.
Press Ok.
Now,
The Macro is being Recorded.
Excel will record Every step you make and document it in VBA language.
What will not be recorded is the time passing as well as the mouse movement.
SO take your time to apply the steps you want to record.
In this Macro Recording, i am Going to record the following Steps:
Adjusting Column and Row Width
Centering the Text in the Cell
Pressing Ctrl to Select the Columns and Rows Heading
i will Press Ctrl + B to change the Font to Bold
Center the Data i have, and adding a Background Color as well as Borders.
At the end of the list, i will add a function to find out the Maximum Value.
Type in the Equal Sign, Max then Tabstop to choose the function and select the data in the column.
And so on.
When finished, click on the stop recording button in the Developer Tab.

***Manage and Activate Macro
Now click on the Macros button.
A Macro Manager Window will appear.
Here You will see all the Macros in the Workbook,
you can run them,
edit, delete and adjust them.eClick now on the Edit button. Excel will take you to the visual basic Editor.
here you will see at the top the Name of the Macro we entered Before
as well as a documentation of all the steps we did in the VBA Language.
Here You can Edit some of the VBA Text.
this will not be in the scope of this tutorial.
Now let's close the VBA Editor and Go back to the Excel Sheet.
Click on Macro again and choose Options.
Here we will assign a Keyboard Shortcut to run the Macro as well as a description that helps us understand what is recorded.
This is important if you have multiple Macros or will reopen the Document in the distant future.
For the Keyboard Shortcut, i recommend using Capital Letter, meaning you will press Ctrl + Shift + the Letter you choose.
This way, you will have no conflict with the Existing Excel Keyboard Shortcuts.
For the Description box, the more details you enter the better.
So now, i will jump to a new Sheet and Run the Macro there.
As you can see, all the steps we recorded were applied WITHIN a SEC.
IMAGIN the time you save if you get a monthly report and you have to edit it every time.
To Run a Macro, you can go to the Macro manager and click Run.
YOu can enter the Keyboard Shortcut you Chose
You can even attach the Macro to an Object.
To do that go to the insert button on the developer tab, and choose Button, The Option on the Top left.
As you can see the Mouse cursor changed to a Black Cross.
........*


Смотрите видео For BEGINNERS: Using and Creating MACROS in Excel онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь SWAK Academy - Investing Simplified 31 Май 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 52 раз и оно понравилось 6 людям.