The story of how a single macro, not an AI agent, was the biggest boost to my work efficiency recently
Recently, I've been hearing a lot about AI agents.
“From now on, AI will handle tasks autonomously.”
I use AI every day, and I'm
quite helped by it for things like organizing text, brainstorming ideas, writing code, and summarizing.
It's a huge help.
However, I recently had a thought.
“What was the event that improved my work efficiency the most recently?”
I asked myself.

And when I looked back, the answer was a bit surprising.
It wasn't introducing the latest AI agent.
It wasn't implementing an expensive SaaS.
It wasn't a large-scale DX project.
It was creating a single Excel macro.
And it's a pretty plain macro at that.
The common task of checking multiple sheets
For example, don't you have tasks like this?

When using Excel, things like this happen often.
Open sheet A.
Copy the necessary range.
Paste it somewhere else.
Open sheet B.
Copy the same range again.
Paste it again.
Open sheet C.
Copy it again.
The task is simple. But it is quietly tedious.
Moreover, tasks like this
only take a few minutes each, so they rarely become targets for improvement.
That is why they tend to be ignored.
However, it is precisely these kinds of tasks that
are actually slowly draining your time and focus.
What the macro I created does
The macro I created this time,
roughly speaking, does this.

Select the target sheets in the file by number
and copy only the specified cell ranges all at once.
That is the macro.
It is incredibly simple and feels like a total beginner's macro.



What makes it convenient is thatyou can extract the same range from multiple sheetsat once.
Sub SelectAndCopyMultipleSheetsByNumber()
Dim sheetList As String
Dim sheetNames() As String
Dim count As Integer
Dim i As Integer
Dim userInput As Variant
Dim sheetNums() As String
Dim num As Variant
Dim selectedSheets() As String
Dim selectedCount As Integer
Dim sourceRange As Range
Dim tempWs As Worksheet
Dim ws As Worksheet
Dim destRow As Long
Dim wsSource As Worksheet
' 1. 現在アクティブなブックにあるすべてのシート名を取得してリスト化
count = 0
For i = 1 To ActiveWorkbook.Sheets.count
count = count + 1
ReDim Preserve sheetNames(1 To count)
sheetNames(count) = ActiveWorkbook.Sheets(i).Name
sheetList = sheetList & count & " : " & ActiveWorkbook.Sheets(i).Name & vbCrLf
Next i
' 2. ダイアログを表示してシート番号を入力させる
userInput = InputBox("コピー元のシートを番号で入力してください:" & vbCrLf & _
"※複数選択は「,」または「/」区切り(例:1,3 または 1/3)" & vbCrLf & _
"※すべて選択する場合は「all」または「0」と入力" & vbCrLf & vbCrLf & sheetList, "シートの選択")
' キャンセルまたは未入力の場合は終了
If userInput = "" Then Exit Sub
' 3. 入力内容の解析(すべて選択 か 個別選択 か)
selectedCount = 0
If LCase(userInput) = "all" Or userInput = "0" Or userInput = "全て" Then
' 「all」または「0」の場合は全シートを配列に格納
For i = 1 To count
selectedCount = selectedCount + 1
ReDim Preserve selectedSheets(1 To selectedCount)
selectedSheets(selectedCount) = sheetNames(i)
Next i
Else
' 個別入力の場合は区切り文字をカンマに統一して分割
userInput = Replace(userInput, "、", ",")
userInput = Replace(userInput, "/", ",")
userInput = Replace(userInput, "/", ",")
userInput = Replace(userInput, " ", ",")
sheetNums = Split(userInput, ",")
For Each num In sheetNums
num = Trim(num)
If IsNumeric(num) Then
If CInt(num) >= 1 And CInt(num) <= count Then
selectedCount = selectedCount + 1
ReDim Preserve selectedSheets(1 To selectedCount)
selectedSheets(selectedCount) = sheetNames(CInt(num))
End If
End If
Next num
End If
' 有効な番号が一つもなかった場合
If selectedCount = 0 Then
MsgBox "有効なシート番号が入力されませんでした。", vbExclamation
Exit Sub
End If
' 4. 範囲を選択させるために、選ばれた最初のシートを開く
Set wsSource = ActiveWorkbook.Sheets(selectedSheets(1))
wsSource.Activate
On Error Resume Next
Set sourceRange = Application.InputBox( _
Prompt:="コピーする範囲をマウスで選択するか、キーボードで入力してください。" & vbCrLf & "(例: A2:D10)", _
Title:="範囲の指定", _
Type:=8)
On Error GoTo 0
' キャンセルされた場合は終了
If sourceRange Is Nothing Then Exit Sub
' 5. コピー処理(単一選択か複数選択かで分岐)
If selectedCount = 1 Then
' 1枚だけならそのままクリップボードへ
wsSource.Range(sourceRange.Address).Copy
MsgBox selectedSheets(1) & " シートのデータをクリップボードにコピーしました!", vbInformation
Else
' 複数枚なら一時的なまとめシートを一番左(最初)に作成して結合
Application.ScreenUpdating = False
' ★変更箇所:まとめシートをブックの最初(インデックス1の前)に挿入
Set tempWs = ActiveWorkbook.Sheets.Add(Before:=ActiveWorkbook.Sheets(1))
tempWs.Name = "コピー用まとめ_" & Format(Now, "hhmmss")
destRow = 1
For i = 1 To selectedCount
Set ws = ActiveWorkbook.Sheets(selectedSheets(i))
' データのコピー
ws.Range(sourceRange.Address).Copy Destination:=tempWs.Range("A" & destRow)
' 次の貼り付け位置を更新(A列の最終行の次)
destRow = tempWs.Cells(tempWs.Rows.count, "A").End(xlUp).Row + 1
Next i
' まとめたデータをクリップボードにコピー
tempWs.UsedRange.Copy
Application.ScreenUpdating = True
MsgBox "指定された " & selectedCount & " 枚のシートのデータを結合し、クリップボードにコピーしました!" & vbCrLf & _
"(※結合データは一番左の「" & tempWs.Name & "」シートにも残しています)", vbInformation
End If
End Sub
It wasn't just work time that I was able to reduce with this macro.
What was even more significant was the reduction in time spent hesitating and the burden of double-checking.
When doing things manually, you end up thinking about these kinds of things every time.
Each one is small.
But when they happen every day, every week, and every month, they become a significant burden.
This kind of burden is hard to see as actual work time.
However, it definitely drains your concentration.
The minor copying and verification tasks that arise from that
are not the essence of the work.
What you should really be doing is looking at the numbers and thinking.
It is making decisions based on progress.
It is deciding on the next course of action.
But in the preliminary stages, you end up using your attention on copying and transcribing.
This is a huge waste.
Automation is about protecting human attention
When people talk about improving work efficiency, it is often discussed in terms of 'how many minutes were saved.'
Of course, that is also important.

However, what I felt once again this time is that
the essence of efficiency is not just about saving time.
Rather, what is important is protecting human attention.
Saving our concentration for where humans truly need to use it.
To that end, we should leave what can be left to machines to the machines.
This macro was exactly that.
Find the sheet.
Copy the range.
Paste in order.
Check for any omissions.
By handing these tasks over to a macro,
humans can focus on 'looking at the content and thinking'.
Not 'a macro at this late stage?', but 'precisely because it's a macro'
Some people might think this here.
'In the age of AI, Excel macros at this late stage?'
Certainly, macros are not a new technology.
They aren't flashy either.
They don't go viral.
But, in improving on-site operations,
I felt that new technology doesn't always win.

What is important is whether you can reduce the friction that is there right now, I think.
It could be AI.
It could be a macro.
It could be GAS.
It could be RPA.
It could even be reviewing your procedure manuals.
More than the name of the technology you use,whether it actually makes life easier for peopleis what matters most.
Technically, this macro is simple.
But it was truly effective in reducing work-related stress.
I realized that you don't need to use trendy tools for it to be enough.
Small macros serve as blueprints for utilizing AI agents
It would be a waste to end this story about macros as just another
handy Excel trick.
This is because such small-scale automation
serves as practice for mastering AI agents in the future.
To delegate work to an AI agent,
your tasks need to be inventoried to some extent.
Instead of saying, "Just summarize this nicely,"
Which data should be used?
Under what conditions should it be processed?
In what format should it be output?
What should be done in case of an error?
The more clearly these are defined, the easier it becomes to delegate to AI or systems.
In other words, creating a macro is not just about making Excel more convenient.
It is about verbalizing and structuring your work.
And that becomes the blueprint for delegating work to AI agents.
The first step toward automation can be within your immediate reach
I want to eliminate my workload entirely with AI agents.
It is natural to think that way.
However, rather than aiming for major automation right away,
it is faster to first look at the tasks within your immediate reach.

In many cases, these are left alone with the thought, "It's a bit of a hassle, but I guess I'll just do it by hand."
But that is exactly where the seeds for improvement lie.
Big DX starts with small discomforts
The term DX inevitably sounds like something grand.

However, the moments where you truly feel a change in the workplace are often much smaller.
"Oh, I can finish this with just one button now."
"The weekly aggregation has become easier."
"I don't feel rushed before meetings anymore."
"I don't have to worry about making mistakes."
These small experiences build trust in automation.
And once trust in automation is established, it becomes easier to proceed with the next improvement.
I did it with a macro.
Maybe I can do the next one with GAS.
Maybe I can connect it with an API.
Maybe I can leave it to AI.
This order is surprisingly important.
Conclusion
I believe that many jobs will be automated by AI from here on out.
However, that future will not arrive suddenly like magic.
Break down the tasks in front of you.
Find the repetitions.
Establish rules.
Automate on a small scale.
I believe that beyond that accumulation, the amount of work we can entrust to AI will increase.
This macro is very plain in appearance.
Select multiple sheets.
Specify the range.
Copy them all at once.
That is all it does.
But that "all it does" reduced friction in the workplace.
It reduced the burden of verification.
It reduced the anxiety of making mistakes.
It created time to focus on what we should really be thinking about.
It is important to keep up with new technology.
But looking at what is right in front of you is just as important.
The tasks you repeat every week in your Excel.
The copy-pasting you do every time before a meeting.
The consolidation work that always happens at the end of the month.
The plain manual work that someone is supporting through sheer willpower.
That is where the first opportunity for automation lies.
Before changing everything with AI agents, start with a macro within a one-meter radius.
Surprisingly, the improvement that makes work the easiest
might be very close by.
いいなと思ったら応援しよう!
「いいかも」と思ったら、応援して頂けると励みになります!