最近好像是 Excel 的旺季...
試試看
Sub InsertCell()
Dim nC1, nC2 As Integer
Dim bRun As Boolean
nC2 = 1
While Not Cells(2, nC2) = ""
nC1 = nC2
bRun = True
While (Not Cells(1, nC1) = "") And (bRun = True)
If Cells(1, nC1) = Cells(2, nC2) Then
If nC1 <> nC2 Then
Range(Cells(2, nC2), Cells(2, nC1 - 1)).Select
Selection.Insert shift:=xlToRight
End If
bRun = False
End If
nC1 = nC1 + 1
Wend
nC2 = nC2 + 1
Wend
End Sub