``No one knows what's inside the Excel macro that my predecessor created...'' Are you having problems with the handover due to transfer or retirement, and are you worried about black box VBA?
According to a 2025 ITmedia survey, 50.9% of companies "sometimes use" Excel macros, and 18.8% "always use them." In other words, approximately 70% of companies relyon macros, but the reality is that only a limited number of people can read the code.
But don't worry. As of February 2026, If you use ChatGPT or Microsoft Copilot, you can have the meaning of the code explained in Japanese even if you have no knowledge of VBA. In this article, we will explain the specific steps to use AI to decipher Excel macros written by others, as well as tips to prevent handover problems.
Why are Excel macros "black boxes"?
In the first place, why are macros so easy to personalize? There are three main causes.
1. No comments or documentation
VBA tends to be written with the mindset that "as long as it works, it's OK." Self-taught people tend not to leave comments (explanations) in their code.
2. Code automatically generated by "Macro Recording" is difficult to read
Excel's "Macro Recording" function is useful, but the generated VBA is redundant and contains a large amount of meaningless description. For example, line by line operations like Selection.Font.Bold = True go on and on, making it hard to understand what is going on.
3. No handover mechanism
In a workplace where there is no culture of creating macro specifications or flowcharts, the moment the person who created them quits, it becomes a situation where ``no one knows''. Even if it suddenly stops working due to an OS update or Excel version update, there is no one who can fix it.
Steps to decode VBA code with ChatGPT [Copy and paste OK]
The easiest way is to paste the VBA code into ChatGPT (free version is OK) and have them explain it to you.
Step 1: Open the VBA Editor
Once the Excel file is open, press Alt + F11. A window called "Visual Basic Editor (VBE)" will then appear. Expand "Standard Modules" from the tree on the left to find the macro code.
Step 2: Copy the code
Select the macro you want to decode (the block surrounded by Sub ~ End Sub) and copy it with Ctrl + C.
Step 3: Paste into ChatGPT and ask your question
Use a prompt like the one below to get an easy-to-understand answer.
What the following Excel VBA code does,
Please explain in Japanese so that even programming beginners can understand.
The process flow is listed in bullet points,
Please briefly explain what each line does.
---
(Paste VBA code here)
In a few seconds, ChatGPT will return the process flow in natural Japanese, such as ``This macro copies the data in column A to column B, deletes blank lines, and finally displays the sheet in print preview.''
Point:As a tip to improve the accuracy of your answers, if you additionally tell them the structure of the sheet in which this macro is used (column names and data examples), you will receive a more accurate explanation.
How to use Microsoft Copilot [For corporate users]
If your company subscribes to Copilot for Microsoft 365 (¥4,497/user per month, as of February 2026), you can ask questions to the AI directly in Excel.
How to use Copilot in Excel:
- Save the Excel file to OneDrive or SharePoint and turn on AutoSave
- Click the Copilot icon on the Home tab of the ribbon
- A side panel will open; type ``Describe the macros in this workbook''
However, as of February 2026, Copilot in Excel has limited ability to directly read code in the VBA editor. If you want to ensure decryption, we recommend copying the VBA code and pasting it into the browser version of Microsoft Copilot (formerly Bing Chat). You can use this for free.
How to use ChatGPT and Copilot:
- ChatGPT: Good at analyzing long codes and suggesting refactorings. Even the free version is usable
- Copilot (browser version): Strength is cooperation with Microsoft products. You can also use Excel functions and Power Query questions
- Copilot for Microsoft 365: Can be completed within Excel, but requires paid contract
Don't just take AI's answers at face value! Three points to check
Although AI is very useful, its answers may not be 100% correct. Please be especially careful about the following when decoding VBA.
1. The processing content may be "guessed" from the variable name
AI infers the meaning from the context of the code. If the variable name is ambiguous, such as x or tmp, the explanation may deviate from the actual process. Make sure to check the data on the actual sheet.
2. External references/effects on other sheets may be overlooked
If a macro references another workbook or sheet, AI cannot grasp the entire picture by looking only at that part of the code. Also let us know the relevant sheet name and file path.
3. Don't paste sensitive data directly
If you paste code that contains confidential data into ChatGPT or Copilot, please check your company's security policy. If personal names or business partner names are included, it is safe to replace them with dummy data before pasting them. ChatGPT Team plan (for corporations) and Copilot for Microsoft 365 are set so that input data is not used for learning.
No more black boxes! 3 tips for transferring macros
Once you have decoded it, let's create a system that will never turn it into a black box again.
1. Have the AI write a "specification"
If you tell ChatGPT, "Please create a specification for this VBA code in Markdown format. Please include the processing overview, input/output, prerequisites, and notes," it will generate a specification that can be used as an internal document.
2. Ask the AI to add comments to the code
If you ask the AI, "Please add Japanese comments to each processing block of this VBA code," it will return code with comments. Just paste it back into the VBE and the code will be easier to read for the next person.
3. Leave a "usage memo" for the macro on a sheet
If you create a "README" sheet in the Excel file and write down "what this macro does," "which button to use to run it," and "things to check before running it," the hurdles to handover will be significantly lowered.
FAQ
Can I decode macros in ChatGPT without any knowledge of VBA?
Yes, you can. By pasting the code into ChatGPT and instructing it to "explain it in a way that even beginners can understand," you can understand the process flow even if you have no programming experience. However, it is important to check whether the AI explanation is correct by comparing it with the actual Excel data.
Is there any security problem if I paste my company's macros into ChatGPT?
According to OpenAI's terms of use for the free version of ChatGPT, input data may be used to improve the model. If confidential information is involved, we recommend using the ChatGPT Team/Enterprise plan (data learning off) or Copilot for Microsoft 365. In any case, please check your company's security policy in advance.
Can I use AI within Excel without Copilot for Microsoft 365?
Copilot for Microsoft 365 requires a paid add-on (¥4,497/user per month as of February 2026). Even if you do not have a contract, you can decrypt the code in the same way by copying and pasting the code into the browser version of Microsoft Copilot or ChatGPT.
Can AI decode codes created by recording macros?
Yes. Rather, the redundant code generated by "macro recording" is where AI excels. If you ask someone to "organize this code and explain what it's doing," it will return both a simple code with unnecessary lines removed and an explanation in Japanese.
References
- Macro hell, even if you are prepared for personalization, you still have to use Excel [2025 survey] — ITmedia, 2025
- Frequently asked questions about Copilot in Excel — Microsoft Support
- Achieve Excel automation without learning VBA with ChatGPT and Copilot — Tips to do it
- Did a "mysterious Excel macro" remain behind when my predecessor retired? Deciphering and maintaining black box VBA — Sugasapo






