{"id":266504,"date":"2024-03-13T20:09:07","date_gmt":"2024-03-13T19:09:07","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=266504"},"modified":"2026-11-10T14:25:35","modified_gmt":"2026-11-10T13:25:35","slug":"usar-macros-excel","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/es\/blog\/excel-features\/how-to-use-macros-in-excel\/","title":{"rendered":"\u00bfC\u00f3mo usar macros en Excel para automatizar tareas?"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; da_is_popup=&#8221;off&#8221; da_exit_intent=&#8221;off&#8221; da_has_close=&#8221;on&#8221; da_alt_close=&#8221;off&#8221; da_dark_close=&#8221;off&#8221; da_not_modal=&#8221;on&#8221; da_is_singular=&#8221;off&#8221; da_with_loader=&#8221;off&#8221; da_has_shadow=&#8221;on&#8221; da_disable_devices=&#8221;off|off|off&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Macros are a great tool to automate repetitive tasks in Excel. By implementing key macros into your spreadsheet, not only do you streamline the production and management of your data through automation, but you also avoid tasking manual inputs, such as dealing with complex formulas. Overall, macros cut your turnaround time and manual effort.<\/p>\n<p>In this article, we\u2019ll show you how to use macros in Excel to automate your workflow. You\u2019ll learn how to make, build or create your own macros in Excel and how to add macros in Excel, so you can get the best custom functionality to automate the processes that will make your work life easier.<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;what-are-macros-in-excel&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>What are macros in Excel?<\/h2>\n<p>A macro is an action or a group of actions that will complete automatically according to your specifications.<\/p>\n<p>Macros (Microsoft Office Macros) are a very powerful tool for automating predictable, repetitive tasks in your office workflow. A macro is a piece of Visual Basic for Applications (VBA) code that is saved inside your document. Once you know how to use (and create) them, you\u2019ll find you can apply macros to a wide range of tasks to free up time to focus on the deep work that will really set your business apart.<\/p>\n<p>There are many different circumstances in which you\u2019d want to use macros to automate parts of your work. Here are just some examples:<\/p>\n<ul>\n<li>Changing the style and formatting of your data.<\/li>\n<li>Creating new documents.<\/li>\n<li><a href=\"https:\/\/www.sheetgo.com\/blog\/excel-features\/excel-connections\/\">Linking with other data sources<\/a> (databases, text files, and more).<\/li>\n<li>Altering data and text.<\/li>\n<\/ul>\n<p>If you&#8217;ve never used macros before, <a href=\"https:\/\/www.sheetgo.com\/automations\/\">Sheetgo&#8217;s AI automations<\/a> might be a good alternative for you. They connect your spreadsheets and keep them updated on a schedule, with no VBA code to write. For more options, see our guides to <a href=\"https:\/\/www.sheetgo.com\/blog\/excel-features\/excel-automation\/\">Excel automation<\/a> and <a href=\"https:\/\/www.sheetgo.com\/blog\/excel-features\/power-automate-excel\/\">Power Automate for Excel<\/a>.<\/p>\n<p>How to create macros in Excel?<\/p>\n<p>Before you can start using macros in Excel, you need to create one. Here\u2019s how.<\/p>\n<p>Let\u2019s say you want your workbook to automatically total the data from each row and the format and style to be consistent for all your workbooks. Instead of wasting time on these tedious actions, you can build a macro to do this for you without the risk of human error.<\/p>\n<p><strong>1.<\/strong> Open your Excel workbook containing your data. In the toolbar, click View &gt; Record Macro.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/macros-in-excel-view-tab-record-macro.webp&#8221; alt=&#8221;Macros in Excel \u2014 View tab with the Record Macro button above a weekly product sales table&#8221; title_text=&#8221;View tab with the Record Macro button above a weekly product sales table&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>2.<\/strong> Name your macro (one word only, no spaces). You can also choose to assign a keyboard shortcut for your macro and add a description (here, you can add anything such as an overview of what the macro does or when you should use it). Click &#8220;OK&#8221;.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/macros-in-excel-record-macro-dialog.webp&#8221; alt=&#8221;Macros in Excel \u2014 Record Macro dialog with the name MonthlyProductSales, a Ctrl+Shift+M shortcut and a description&#8221; title_text=&#8221;Record Macro dialog with the name MonthlyProductSales, a Ctrl+Shift+M shortcut and a description&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>3.<\/strong> Now carry out all of your desired actions. The macro will record everything you do. Here is an example of the changes I want to make to my Excel; adding a new column for total sales, adding currency formatting to my columns, and formatting the header rows. You can also add <a href=\"https:\/\/www.sheetgo.com\/blog\/excel-features\/100-functions-formulas-for-google-sheets-excel-basics\/\">formulas<\/a> and other numbers, text, and cell formatting to your dataset.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/macros-in-excel-total-monthly-sales-column.webp&#8221; alt=&#8221;Macros in Excel \u2014 new Total monthly sales column with a SUM formula and currency formatting&#8221; title_text=&#8221;New Total monthly sales column with a SUM formula and currency formatting&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>4.<\/strong> Once you have applied all of your changes, click \u201cStop recording\u201d in the \u201cView\u201d menu.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/macros-in-excel-stop-recording.webp&#8221; alt=&#8221;Macros in Excel \u2014 View tab with the Stop Recording button and the formatted sales table&#8221; title_text=&#8221;View tab with the Stop Recording button and the formatted sales table&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>Please note:<\/strong> An alternative way to stop recording a macro is to click the icon in the bottom or top left-hand corner of your workbook (depending on whether you have the Excel app or the online version).<\/p>\n<p>[\/et_pb_text][et_pb_text module_id=&#8221;how-to-use-macros-in-excel&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>How to use macros in Excel?<\/h2>\n<p>Before you can use the macro you\u2019ve just created, it\u2019s vital that you perform the following steps; delete your cells, then save the file in a macro-enabled format.<\/p>\n<p>You must delete your data before saving as, otherwise, when you run the macro, it will remember this specific data and add it to any future workbooks. Deleting this data now means that the macro will only remember the actions, not the data.<\/p>\n<p>You then have to save the workbook in a macro-enabled format \u2013 ideally XLTM. If you save it as another format, like XLTX, the macros won\u2019t be able to run.<\/p>\n<p><strong>1.<\/strong> Select all of your data and delete your cells. Right-click and select \u201cDelete\u201d \u2013 this is the only way to delete all values and formatting.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/macros-in-excel-delete-cells-before-saving.webp&#8221; alt=&#8221;Macros in Excel \u2014 right-click menu with Delete highlighted over the selected sales data&#8221; title_text=&#8221;Right-click menu with Delete highlighted over the selected sales data&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>2.<\/strong> Save as a macro-enabled format by heading to File &gt; Save as. Choose the \u201cExcel Macro-enabled Template\u201d (XLTM) or a macro-supportive alternative. Click \u201cSave\u201d.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/macros-in-excel-save-as-xltm-template.webp&#8221; alt=&#8221;Macros in Excel \u2014 Save As dialog with the Excel Macro-enabled Template (.xltm) file format&#8221; title_text=&#8221;Save As dialog with the Excel Macro-enabled Template (.xltm) file format&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text module_id=&#8221;how-to-run-macros-in-excel&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>How to run macros in Excel?<\/h2>\n<p>Depending on how you assign it, you may be able to run macros by pressing a combination shortcut key, a button on the Quick Access Toolbar, or in a custom group on the control ribbon. You can also assign a macro to run automatically when you open your Excel workbook.<\/p>\n<p>Now that you\u2019ve created a macro-enabled template, it\u2019s time to run it. Here\u2019s how:<\/p>\n<p><strong>1.<\/strong> Open your newly-created Excel template file. With standard security settings, you will see a warning notification stating that macros are disabled. You should click \u201cEnable Macros\u201d.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/macros-in-excel-enable-macros-prompt.webp&#8221; alt=&#8221;Macros in Excel \u2014 security prompt asking to disable or enable the macros in the workbook&#8221; title_text=&#8221;Security prompt asking to disable or enable the macros in the workbook&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>Please note:<\/strong> You may not always want to enable content. If you receive a file from a third party, for example, they may be running a macro that could damage or delete your data. This one is safe, however, as we created it ourselves.<\/p>\n<p><strong>2.<\/strong> Import your data into the workbook. You can import from another Excel file or other formats like <a href=\"https:\/\/www.sheetgo.com\/blog\/how-to-solve-with-sheetgo\/import-csv-to-excel\/\">CSV<\/a>. In the toolbar, click Data &gt; Get Data and choose the option that best suits your needs.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/macros-in-excel-data-get-data-menu.webp&#8221; alt=&#8221;Macros in Excel \u2014 Data tab Get Data menu with From HTML, From Text and database options&#8221; title_text=&#8221;Data tab Get Data menu with From HTML, From Text and database options&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>In this example, I\u2019ll select \u201cGet Data\u2026\u201d to import data from another Excel file. Once I\u2019ve located my Excel file, I\u2019ll click \u201cGet data\u201d.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/macros-in-excel-select-workbook-to-import.webp&#8221; alt=&#8221;Macros in Excel \u2014 file picker with a monthly sales workbook selected and the Get Data button&#8221; title_text=&#8221;File picker with a monthly sales workbook selected and the Get Data button&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>3.<\/strong> Click the checkbox of the sheet(s) you want to import. When finished, click the \u201cLoad\u201d button in the bottom-right corner of the window.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/macros-in-excel-load-imported-sheet.webp&#8221; alt=&#8221;Macros in Excel \u2014 import preview of Sheet1 with weekly sales columns and the Load button&#8221; title_text=&#8221;Import preview of Sheet1 with weekly sales columns and the Load button&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><strong>4.<\/strong> Now that your data is in the spreadsheet, go to View &gt; View Macros. Click on the macro you created previously and click \u201cRun\u201d.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/run-macro-in-excel-macro-dialog.webp&#8221; alt=&#8221;Run a macro in Excel \u2014 Macro dialog with MonthlyProductSales selected and the Run button&#8221; title_text=&#8221;Macro dialog with MonthlyProductSales selected and the Run button&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>Alternatively, if you added a keyboard shortcut for your macro, press the combination now to run the Macro.<\/p>\n<p>As you can see from the screenshot below, the macro has automatically applied the actions previously recorded. My new data now has a new \u2018Total monthly sales\u2019 column, currency formatting has been applied to my columns, and the headers have also been formatted.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2026\/11\/run-macro-in-excel-formatted-result.webp&#8221; alt=&#8221;Run a macro in Excel \u2014 new sales data with a Total monthly sales column and currency formatting applied&#8221; title_text=&#8221;New sales data with a Total monthly sales column and currency formatting applied&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; width=&#8221;100%&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text module_id=&#8221;conclusion&#8221; _builder_version=&#8221;4.22.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Conclusion<\/h2>\n<p>Although macros are not widely known or used by the majority of Excel users, they are an incredibly intelligent feature that could streamline the day-to-day operations of many Excel users. What\u2019s more, we\u2019ve seen that macros aren\u2019t as intimidating to set up and run as they might seem.<\/p>\n<p>Here we\u2019ve shown how you can create\/record macros in your spreadsheet, how to save them correctly, and how to run them on other datasets. If you would rather not record or edit VBA, Sheetgo&#8217;s AI automations can take over repetitive spreadsheet tasks across your files.<\/p>\n<p>Looking for more articles on how to make the most of Excel? Take a look at <a href=\"https:\/\/golayer.io\/blog\/excel\/transfer-data-from-one-excel-worksheet-to-another-automatically\/\" target=\"_blank\" rel=\"noopener\">how to transfer data from one Excel worksheet to another automatically<\/a>.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Aprende a usar macros en Excel para automatizar tareas repetitivas: graba una macro, gu\u00e1rdala como plantilla habilitada para macros y ejec\u00fatala con datos nuevos.<\/p>","protected":false},"author":2,"featured_media":266517,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[51],"tags":[],"class_list":["post-266504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-features"],"acf":[],"permalink_manager":null,"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts\/266504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/comments?post=266504"}],"version-history":[{"count":1,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts\/266504\/revisions"}],"predecessor-version":[{"id":266518,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/posts\/266504\/revisions\/266518"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/media\/266517"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/media?parent=266504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/categories?post=266504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/es\/wp-json\/wp\/v2\/tags?post=266504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}