+3 votes
205 views
How to make an Excel macro 2019, 2016

in Office by (551k points)
reopened | 205 views

1 Answer

+4 votes
Best answer

1. How to record a macro in Excel 2019, 2016
2. How to use a macro in Excel 2019, 2016

Microsoft Excel is part of the Office suite and has been designed to offer users a tool loaded with practical functions for the administration of all types of data, whether numerical, text, date and others. Thanks to Excel documents, working with numbers is much easier since we can classify and sort data in a more orientative and faster way thanks to its formulas..

In Excel we find various functions and formulas with which administrative work will be simplified and, therefore, it is natural that we access Excel daily. This tool allows us to perform tasks that can become something routine (copy, paste, adjust, etc.) so we have an automated functionality in Excel that performs common tasks without 100% interaction by the user, his name They are the macros.

A macro is basically a set of commands which is hosted in an Excel place so that they are always available for when its execution is necessary. Macros are written in Visual Basic for Applications (VBA) language, thanks to this language it is possible to access all the features of Excel and thus increase the functionality of the application..

TechnoWikis will explain how to create a macro in Excel and this process applies to both Excel 2016 and the new Excel 2019 edition.

To keep up, remember to subscribe to our YouTube channel! SUBSCRIBE


1. How to record a macro in Excel 2019, 2016

Step 1

For this case we will use Excel 2019 but it is the same process in 2016, for this we have the following data: image
Step 2

The goal is to create a macro that centers the content of the cells. To start, we go to the File menu and there we locate the "Options" section: image
Step 3

Clicking there will display a pop-up window, in it we locate the "Customize ribbon" section and on the right side we activate the "Programmer" box. Click OK to add this new menu in Excel 2019. image
Step 4

Now we must go to the "Programmer" menu and there, in the "Code" group, click on the "Record Macro" option: image
Step 5

Clicking on this option will display the following window where we will define:
  • Name to assign to the macro.
  • If we wish we can add a keyboard shortcut.
  • We can specify whether that macro will be available only for the current workbook or for all Excel workbooks.
  • It will be possible to add a description to better identify the macro action.

image

Step 6

Once this is defined, click on the Accept button and proceed to perform the action on the data. The macro will record each click and the clicked cell or icon inside the Excel window and then translate it into a special VBA code. In this case we have selected the text and clicked on the Center icon. image
Note
It must be taken into account that the recording also specifically records the position of the cells where we are applying it.
Step 7

Once we complete the actions, we go back to the "Scheduler" menu and click on the "Stop Recording" button to complete the creation of the macro: image

2. How to use a macro in Excel 2019, 2016

Step 1

Now, with the macro created, we go to some sheet where we want to apply this macro and from the “Programmer” menu, “Code” group we click on “Macros” and the following window will be displayed where we can see the macros created. Remember that you can also use a key combination if you defined it in the Macro properties. image
Step 2

There we select the desired macro and clicking on “Execute” will automatically apply the recorded action. Remember that it will run in the same position of cells where it was recorded. image
Step 3

If we want to save the workbook, we must take into account the option "Workbook for macros" in the "Type" field: image
Step 4

To manage the macro in Excel, we go back to the "Macros" option in the "Programmer" menu and it will be possible:
  • Run the macro
  • Receive a step by step how to use it
  • Delete the macro
  • Edit it and more.

image

Thus, we have learned to use a basic macro in Excel, but it will certainly be a great help for repetitive processes in this Office application..


by (3.5m points)
edited

Related questions

+5 votes
1 answer
+3 votes
1 answer
+4 votes
1 answer
asked Sep 16, 2019 in Office by backtothefuture (551k points) | 475 views
+4 votes
1 answer
asked Sep 28, 2019 in Office by backtothefuture (551k points) | 209 views
+4 votes
1 answer
asked Sep 20, 2019 in Office by backtothefuture (551k points) | 412 views
Sponsored articles cost $40 per post. You can contact us via Feedback
10,634 questions
10,766 answers
510 comments
3 users