Excel - Edit a macro Tutorial
In this video, you will learn how to edit a macro using Microsoft 365. The video covers the steps to modify a macro and demonstrates the process in a clear and concise manner.
This tutorial will help you enhance your skills in using macros and make the most out of Microsoft 365.
- 3:29
- 4122 views
-
Excel - Assign a button to a macro
- 2:49
- Viewed 4700 times
-
Excel - One click Forecasting
- 1:01
- Viewed 5222 times
-
PowerPoint - Add a sound effect to a transition
- 3:45
- Viewed 20347 times
-
Outlook - Create an e-mail message
- 2:46
- Viewed 5226 times
-
Word - Take tables of contents (TOCs) to the next level
- 3:51
- Viewed 3765 times
-
Power BI - General Introduction
- 2:54
- Viewed 5930 times
-
Power BI - Introduction to Power BI Desktop
- 2:52
- Viewed 5628 times
-
Outlook Online - Setting up a meeting with Outlook Online
- 1:47
- Viewed 2543 times
-
Remove a watermark
- 2:20
- Viewed 67765 times
-
Change the default font for your emails
- 1:09
- Viewed 62841 times
-
Collapsible headings
- 3:03
- Viewed 36685 times
-
How to recall or replace a sent email in Outlook Web
- 0:53
- Viewed 30658 times
-
How do I prevent the transfer of an email?
- 2:07
- Viewed 29793 times
-
Add headers and footers to slides
- 3:52
- Viewed 24880 times
-
Change footnote font, size, and formatting
- 2:48
- Viewed 24661 times
-
Edit headers and footers on the slide master
- 4:56
- Viewed 20990 times
-
Add a sound effect to a transition
- 3:45
- Viewed 20347 times
-
Add sound effects to an animation
- 4:29
- Viewed 19230 times
-
Remove a watermark
- 2:20
- Viewed 67765 times
-
Change the default font for your emails
- 1:09
- Viewed 62841 times
-
Collapsible headings
- 3:03
- Viewed 36685 times
-
How to recall or replace a sent email in Outlook Web
- 0:53
- Viewed 30658 times
-
How do I prevent the transfer of an email?
- 2:07
- Viewed 29793 times
-
Add headers and footers to slides
- 3:52
- Viewed 24880 times
-
Change footnote font, size, and formatting
- 2:48
- Viewed 24661 times
-
Edit headers and footers on the slide master
- 4:56
- Viewed 20990 times
-
Add a sound effect to a transition
- 3:45
- Viewed 20347 times
-
Add sound effects to an animation
- 4:29
- Viewed 19230 times
-
Preparing for the EU AI Act: Timeline and Obligations
- 01:54
- Viewed 119 times
-
Using AI in the Workplace: 3 Tips to Minimize Risks
- 03:10
- Viewed 120 times
-
Shadow AI: Identifying Uncontrolled AI Use
- 02:21
- Viewed 118 times
-
EU AI Act Risk Levels: From Minimal to Unacceptable
- 02:37
- Viewed 158 times
-
Understanding the EU AI Act: A Regulation Governing the Use of AI
- 02:24
- Viewed 127 times
-
Analyze the performance of a newsletter or an edition in Outlook
- 01:30
- Viewed 166 times
-
Collaborate on writing an edition in Outlook
- 01:35
- Viewed 145 times
-
Enhance an edition and create a template in a newsletter
- 06:14
- Viewed 138 times
-
Collaborate on a Clipchamp Project
- 01:21
- Viewed 448 times
-
Create a Video with AI in Clipchamp
- 03:26
- Viewed 395 times
Objectifs :
This video aims to guide viewers on how to edit an existing macro in Excel to change its functionality from entering day names to entering day numbers, and to arrange them vertically in a column instead of horizontally in a row.
Chapitres :
-
Introduction to Macro Editing
In this video, we continue from our previous lesson on recording macros. We will focus on editing the macro named 'FillDaysRelative', which currently enters the days of the week across a row. Our goal is to modify this macro so that it enters the days as numbers and arranges them vertically in a column. -
Accessing the Macro for Editing
To begin editing the macro, click the macro button. Select the last recorded macro, 'FillDaysRelative', and then click 'Edit'. This action opens the macro in the Visual Basic Editor, a specialized text editor for programming macros. -
Understanding the Macro Structure
In the Visual Basic Editor, the macro is defined as a 'Sub' or subroutine, with the name 'FillDaysRelative' followed by parentheses. To modify this macro, select all the text from 'Sub' to 'End Sub' and copy it using Ctrl + C. Then, click at the end of the text, press Enter, and paste the copied text. -
Renaming the Macros
Next, we will rename the original macro to 'FillDaysRelativeR' for rows and the copied macro to 'FillDaysRelativeC' for columns. Since macros cannot share the same name, this step is crucial for avoiding conflicts. -
Modifying the Macro Instructions
The first modification involves changing the ActiveCell formula from 'Sunday' to the number '1'. The next change is in the autofill designation. We will alter the range from 'A1:G1' (across the row) to 'A1:A7' (down the A column). Make sure to change it in both specified locations to ensure the macro behaves as intended. -
Saving Changes and Running the New Macro
After making these minor changes, close the Visual Basic Editor by clicking the red 'X'. Now, if you click on 'Macros', you will see 'FillDaysRelativeC', the new macro. Running this macro will now enter the numbers 1 through 7 down column A instead of the day names across row 1. -
Conclusion and Next Steps
In this video, we demonstrated how a few minor changes in the Macro Editor can significantly alter the functionality of a macro. In the next video, we will learn how to save your macro so that it can be used anytime with any workbook on your computer.
FAQ :
What is a macro in Excel?
A macro in Excel is a sequence of instructions that automate tasks, allowing users to perform repetitive actions quickly and efficiently.
How do I create a macro?
You can create a macro by recording your actions in Excel or by writing the code manually in the Visual Basic Editor.
What are relative references in macros?
Relative references allow a macro to adjust its cell references based on the current position of the active cell, making it adaptable to different situations.
Can I edit an existing macro?
Yes, you can edit an existing macro by opening it in the Visual Basic Editor and modifying the code as needed.
What is the Visual Basic Editor?
The Visual Basic Editor is a tool within Excel that allows users to write, edit, and manage macros using Visual Basic for Applications (VBA).
How do I save a macro for future use?
To save a macro for future use, you can save it in your personal macro workbook or in a specific workbook where you want to use it.
Quelques cas d'usages :
Automating Weekly Reports
A financial analyst can use macros to automate the generation of weekly reports by entering data for each day of the week, saving time and reducing errors.
Data Entry for Surveys
A data entry clerk can create a macro to quickly fill in survey responses, allowing for efficient data collection and analysis.
Inventory Management
A warehouse manager can use macros to update inventory levels automatically, ensuring accurate stock counts and timely reordering.
Creating Custom Dashboards
A business analyst can develop macros to populate custom dashboards with data from various sources, streamlining reporting processes.
Batch Processing of Data
A researcher can apply macros to process large datasets in batches, applying consistent formatting and calculations across multiple files.
Glossaire :
Macro
A macro is a set of instructions that automate repetitive tasks in software applications, particularly in spreadsheet programs like Excel.
Relative References
Relative references in macros allow the macro to adjust the cell references based on the position of the active cell, making the macro more flexible.
Visual Basic Editor
The Visual Basic Editor is a specialized text editor used for writing and editing macros in Visual Basic for Applications (VBA).
Subroutine
A subroutine, or 'Sub', is a block of code in VBA that performs a specific task and can be called from other parts of the program.
Autofill
Autofill is a feature that allows users to automatically fill a series of cells with data based on a pattern or existing data.
R1C1 Reference Style
R1C1 reference style is a way of referencing cells in Excel where 'R' stands for row and 'C' stands for column, allowing for more dynamic cell references.
Cette formation pourrait intéresser votre entreprise ?
Mandarine Academy vous offre la possibilité d'obtenir des catalogues complets et actualisés, réalisés par nos formateurs experts dans différents domaines pour votre entreprise