Excel - Work with macros Tutorial
In this video, you will learn how to work with macros in Microsoft 365. The video covers the basics of macros and demonstrates how to create and use them in various Office applications like Word, Excel, and PowerPoint.
This will help you automate repetitive tasks and increase your productivity with Microsoft 365.
- 4:40
- 4363 views
-
Teams - Do I share with OneDrive, SharePoint, or TEAMS?
- 2:24
- Viewed 3752 times
-
SharePoint (Classic Sites) - Understanding the different types and roles of team sites in SharePoint
- 3:05
- Viewed 3425 times
-
SharePoint (Classic Sites) - Sharing a folder or document with someone outside the company
- 3:44
- Viewed 3440 times
-
SharePoint (Classic Sites) - Restricting a document to read-only mode (Extract a document)
- 2:05
- Viewed 3285 times
-
Societal Implications of Generative AI
- 5:58
- Viewed 2271 times
-
Outlook - Easily Sort Your Mails
- 01:38
- Viewed 436 times
-
Outlook - Use Categories
- 02:51
- Viewed 508 times
-
Remove a watermark
- 2:20
- Viewed 31028 times
-
Activate the features of Teams Premium
- 3:48
- Viewed 17254 times
-
Create a quick poll in Outlook with Microsoft Forms
- 3:38
- Viewed 14636 times
-
Collapsible headings
- 3:03
- Viewed 13960 times
-
Change the default font for your emails
- 1:09
- Viewed 13187 times
-
How do I prevent the transfer of an email?
- 2:07
- Viewed 12849 times
-
How to recall or replace a sent email in Outlook Web
- 0:53
- Viewed 12728 times
-
Protect a document shared by password
- 1:41
- Viewed 10969 times
-
Create automatic reminders
- 4:10
- Viewed 10784 times
-
Morph transition
- 0:43
- Viewed 9935 times
-
Remove a watermark
- 2:20
- Viewed 31028 times
-
Activate the features of Teams Premium
- 3:48
- Viewed 17254 times
-
Create a quick poll in Outlook with Microsoft Forms
- 3:38
- Viewed 14636 times
-
Collapsible headings
- 3:03
- Viewed 13960 times
-
Change the default font for your emails
- 1:09
- Viewed 13187 times
-
How do I prevent the transfer of an email?
- 2:07
- Viewed 12849 times
-
How to recall or replace a sent email in Outlook Web
- 0:53
- Viewed 12728 times
-
Protect a document shared by password
- 1:41
- Viewed 10969 times
-
Create automatic reminders
- 4:10
- Viewed 10784 times
-
Morph transition
- 0:43
- Viewed 9935 times
-
Copilot Agents: Analyst
- 03:05
- Viewed 32 times
-
Copilot Agents: Research
- 02:11
- Viewed 37 times
-
Create a Story with Copilot
- 01:19
- Viewed 32 times
-
Create a Draft with Copilot
- 01:35
- Viewed 37 times
-
Clean Up a Table with Copilot
- 01:33
- Viewed 28 times
-
Differentiate Between Copilot Versions
- 02:04
- Viewed 37 times
-
Decode the impact of your communication campaigns
- 02:51
- Viewed 141 times
-
Use Copilot to draft a communication
- 02:18
- Viewed 150 times
-
Create visuals without design skills
- 03:54
- Viewed 153 times
-
Create a brand kit to set the tone
- 03:21
- Viewed 215 times
Objectifs :
Learn how to automate repetitive tasks in Excel by recording macros, including the importance of using relative references for effective macro functionality.
Chapitres :
-
Introduction to Macros in Excel
In this section, we will explore how to automate repetitive tasks in Excel using macros. Macros allow you to perform a series of actions with a single click, significantly improving efficiency. -
Setting Up the Macro Recorder
To begin, ensure that the macro recorder is available on the ribbon. Access this by clicking the File tab, selecting Options, and then customizing the ribbon. In the code group, you will find the 'Record Macro' button along with other related options. -
Recording a Simple Macro
We will record a macro to automate an auto-fill operation. Start by typing 'Sunday' in a cell. Right-click the cell and drag it to the right. As you drag, a tooltip will display the values that will fill each cell, progressing through to 'Saturday'. Release the right mouse button and select 'Fill Series' to complete the action. After recording, clear the cells and name the macro 'FillDays'. Remember, macro names cannot contain spaces. -
Testing the Recorded Macro
After stopping the recording, clear the filled cells and select 'Day One' to test the macro. Open the macro dialog box and click 'Run'. If the macro fills the wrong cells, it indicates that the macro recorder was set to absolute references by default. -
Understanding Relative References
The failure of the macro to fill the correct cells occurred because the macro recorder was not set to use relative references. To fix this, clear the cells, enable 'Use Relative References', and start recording a new macro named 'FillDaysRelative'. After typing 'Sunday' and performing the auto-fill, stop the recording. -
Successful Execution of the Relative Macro
Clear the cells again and switch to a different starting cell, such as C7. Run the 'FillDaysRelative' macro. This time, it should work perfectly, demonstrating the importance of using relative references for macros. -
Conclusion and Next Steps
In the next video, we will learn how to manually rewrite the 'FillDaysRelative' macro using the Visual Basic Editor in Excel. Understanding how to create and modify macros will enhance your ability to automate tasks effectively.
FAQ :
What is a macro in Excel?
A macro in Excel is a sequence of instructions that automate repetitive tasks, allowing users to perform complex actions with a single click.
How do I record a macro in Excel?
To record a macro in Excel, go to the 'View' tab, click on 'Macros', and select 'Record Macro'. Perform the actions you want to automate, then click 'Stop Recording' when finished.
What are relative references in Excel macros?
Relative references allow a macro to adjust its actions based on the current position of the active cell, making it more flexible and applicable to different locations in the worksheet.
Why did my macro not work as expected?
If your macro did not work as expected, it may be due to not using relative references. Ensure that the 'Use Relative References' option is enabled before recording the macro.
Can I edit a macro after recording it?
Yes, you can edit a macro after recording it by using the Visual Basic Editor, where you can modify the VBA code to customize its functionality.
Quelques cas d'usages :
Automating Data Entry
In a sales department, a user can create a macro to automate the entry of daily sales data into a spreadsheet, saving time and reducing errors.
Generating Weekly Reports
A project manager can use a macro to automatically generate weekly status reports by filling in predefined templates with data from various sources.
Creating Custom Schedules
An HR professional can record a macro to fill in employee schedules based on a standard template, allowing for quick adjustments and updates.
Data Cleanup
A data analyst can use a macro to automate the process of cleaning up data sets, such as removing duplicates or formatting cells consistently.
Batch Processing of Files
A finance team can create a macro to batch process multiple Excel files, applying the same calculations or formatting across all documents efficiently.
Glossaire :
Macro
A macro is a set of instructions that automate repetitive tasks in Excel. It allows users to perform complex sequences of actions with a single command.
Macro Recorder
The macro recorder is a built-in tool in Excel that allows users to record their actions and create a macro without needing to write any code.
Relative References
Relative references in Excel macros allow the macro to adapt to the position of the active cell. This means that the macro will perform actions based on the current cell's location rather than fixed cell addresses.
Auto Fill
Auto Fill is a feature in Excel that allows users to quickly fill a series of cells with data based on a pattern, such as days of the week.
Visual Basic Editor
The Visual Basic Editor (VBE) is a tool in Excel that allows users to write and edit VBA (Visual Basic for Applications) code for more advanced macro creation and customization.
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