If you understand the basics of Excel, such as formulas and charts, fairly well, you can try automation. These functions are called macros and save time by automating repetitive tasks. Here are a few tips for creating a macro in Excel. This is one of the most advanced tasks we've done yet, so don't worry if you're struggling the first time.
Macros are an advanced Excel function and therefore they fall under the Developer ] tab . If you've never used the Developer tab before, we'll start with tips to set it up.
Enable the Developer tab
1. Right-click anywhere on the tabbed ribbon at the top of your screen and select Customize the ribbon .
You can also go through the menu with File> Options> Customize Ribbon but it all depends on your personal preference.
2. Select the Main Tabs option from the menu. It will probably be selected by default, but check this again. Now add a check in the box next to the Developer option.
The spreadsheet used above to enable the Developer tab is not the sheet we will use to our macro, but the steps remain the same.
Create a macro in Excel
Add a command button
The first thing we need to do when creating our Macro is to add a button . The command button activates the macro as soon as it is composed.
1. Go to the newly added Developer tab and find the section Insert .
2. Open the menu and locate Command Button under the section ActiveX Controls .
3. Drag your command button to your spreadsheet wherever you want to place it.
Assign a macro
Now that you have a command button, it's time to get the button working.
1. Go to the Controls section of the Developer tab. Select Design Mode .
2. Right click on your button and select View Code . This will open the Visual Basic Editor.
3. Move your cursor to the Visual Basic editor and select the line between Private Sub CommandButton1_Click () and End Sub.
4. Enter this code line: Range ("A1"). Value = "Hello World"
This code adds the phrase Hello World to cell A1 when you click the button.
5. Now close the Visual Basic Editor and disable the Design mode option.
6. Test your macro by clicking the command button.
This is far from an advanced macro, but it gives you an idea of how the process works. If you want to know how to create an advanced macro in Excel, you need a little more training.
How do I learn more?
As mentioned above, this tutorial is the simplest introduction to using VBA in Excel. If you want to start writing advanced macros or pivot tables, you may want to take a look at some in-depth instructions. You can get this at a great price with a new learning kit currently offered by Tech Deals.
It's called the Complete Excel Pro Tips Certification Bundle and it contains six modules to get you started. You can study more content about data visualization and analysis or explore other features such as pivot tables. The skills you can gain not only look great on your resume, but are also really useful in real life.
The six modules in the Complete Excel Pro Tips Certification Bundle have a combined retail value of $ 294, but you can already get started for just $ 19. is a great opportunity to brush up on your skills and save some money. You can join the 1,500 people who have already signed up below.
$ 19 .00
The Complete Excel Pro Tips Certification Bundle
Save $ 275  .00
Save $ 275 .00 $ 19 .00