Talk about Excel and work
What is the Macros function?
Introduction to macros and VBA for beginners
Creating monthly bills and collecting numbers from various files. Do you find yourself operating Excel thinking, "I did the same thing last month?"
Macros can automate such routine tasks. What can you do and how can it help you in your work? Let's take an example of actual work.
No code knowledge requiredFirst, experience how the Macros works →What is the Macros function?
Macros are functions that automate routine tasks in Excel.You can perform operations that you would normally perform one at a time, such as inputting data into cells, calculating, formatting tables, and saving.
Excel has a feature called "Macros Recording". If you start recording and then manipulate the table, the steps will remain and you can repeat the same operation later. For simple tasks, you can create macros without having to write the program yourself.
However, the data may not be exactly the same every month. The number of lines may increase or blank spaces may be mixed in. Programming is required to accurately and finely control processing to accommodate these differences. The language used for this is VBA.
VBA stands for "Visual Basic for Applications". The steps remaining in "Macros Recording" are also VBA code. You can modify what you have recorded or create it by writing code from scratch.
What jobs can be automated?
For example, jobs such as: None of this is special work, but it becomes time-consuming as the number of cases increases.
case study1
Creating, formatting, and saving invoices
From posting details to calculating amounts, formatting, and saving PDF. Compare how many minutes it takes to do it manually and how many seconds it takes to do it with a Macros.
Change the address and details for each business partner, calculate the amount, and save it under a fixed name. This series of tasks can be left to macros.
Check out the operation image →case study2
Creating and printing graphs
Record the steps from creating a graph to printing it using "Macros Recording" and turn it into a Macros.
If you create documents in the same format for each meeting, you can decide on the graph type, title, and print range in advance.
Check out the operation image →case study3
Aggregation of multiple files
Read line by line to see what would happen if you wrote VBA code to aggregate the three files received from the branch.
It reads in order the files for each branch and person in charge that arrive in the same format, and compiles the necessary data into one table.
Check out the operation image →Even if it is automated, it is still necessary to check the completed content.However, if you can reduce the repetition of transcription and settings, you can free up time to check the numbers, look at the results, and think about it.
Skills that can be used at work or side jobs
The number of services for aggregating and analyzing data, such as BI tools, is increasing. Still, there are many situations where Excel is used in daily work. I myself feel this very clearly while working as an office worker.
You can add numbers and notes where necessary, and adjust the table to suit the other person. I think Excel's ease of use is one of the reasons it continues to be used. On the other hand, the manual work required to organize the tables may remain as a monthly task.
That's why people who can automate existing Excel tasks are in great hands. When looking for jobs, you can search for "Excel VBA" and "Macros" to find jobs that involve business improvement or tool creation.
The Macros skills you acquire through your job can also be used in your side job.Being able to explain in detail the tasks you can handle, such as creating invoices and monthly aggregations, will make it easier for the requester to understand.
Of course, just being able to write code doesn't mean you'll get a job. My job is to listen to the other person's steps, decide what to automate, check the results, and tell them how to use it. By first trying to improve one of your familiar tasks, you can experience the process.
What is the point of learning now that AI can write code?
Now, you can tell AI what you want to do and have it create VBA code for you. Compared to writing one line at a time from scratch, the burden of starting something is less.
However, I don't recommend using it without knowing anything about VBA. Not only when it stops working, but also because it sometimes gives wrong results without any error.
For example, if you just tell someone to "summarize sales," they won't know which column is sales, what to do with blank spaces, or whether a total row can be included. It is the person's role to decide what they want done and see what is achieved.
You don't need to memorize all the grammar. Which cells are being processed, where are they being repeated, and under what conditions are the processes divided? Once you understand the basics, instructions to the AI and consultation for corrections will become more specific.How to specify ranges, repeat, and write conditional branches is summarized in List of frequently used codes.
Try out the code created by the AI using a copy of the workbook or practice data first. It's a good idea to be able to check that the number of items and total amount match the original data by yourself.
Where should beginners start? 4 steps to get started with macros
You don't need any special software to start using macros. In normal Excel, proceed in the following order.
- Show developer tab
It's hidden at first. Select "File" → "Options" → "Customize Ribbon" and check "Developer". - Try recording the operations using "Macros Recording"
If you press "Record Macros" on the developer tab and then manipulate the table, that step will become a Macros. When saving, select "Excel Macros-enabled workbook (.xlsm)". - Read code with VBE (Visual Basic Editor)
Open it with "Visual Basic" (Alt+F11) in the developer tab. Let's take a look at the code of the recorded Macros. - Write and run short code
Create a place to write the code by selecting ``Insert'' → ``Standard Module'' and try starting with a short code such as inserting a character into a cell. To execute, press the "▶" button or F5 key.
At first, it is sufficient to be able to read "what is being done in which cell" line by line.If you remember repetition and conditional branching after that, you will be able to do it in time.
Details of the preparation steps and how to write variables, range specification, conditional branching, repetition, etc. are summarized on a separate page.
Preparing the Developer environment and code examples that can be copied and usedHow to get started with VBA and a list of frequently used codes →You can practice everything from displaying the Developer tab to entering and running code in your browser.
Practice using the browserPractice your first VBA →How to study macros and VBA for beginners
We recommend A study method to actually move the Excel file of the teaching material while reading the explanation of the mechanism. Rather than just looking at the code, it's easier to understand if you check that "this one line changed this cell."
If you want to study on your own, start with an introductory book that comes with practice files.
We recommend books for those who want to proceed at their own pace. Choosing a book that starts with ``recording macros'' and progresses sequentially to cell specification, repetition, and conditional branching will make it easier to connect your knowledge.
Before purchasing, please check Can I download practice files? whether it is compatible with the version of Excel you are using and Windows/Mac. Rather than finishing the book, I think it's better to focus on working with one example and slightly changing the numbers and conditions.
If you want to check how to write while reading a book, please also use List of frequently used codes.
First, let's take a look at how macros can change your work.
Before you start studying all of a sudden, just knowing that something works like this may give you an idea of what you want to make. Try out three different jobs with Keynyan, Mauchu, and Macrow. Finally, you can practice writing and running your own code.
Experience invoice automation →