こういうマクロをずっと探していました。
マクロは 1004 エラーをスローしColumns(l + 1).Insert
、黄色で強調表示されます
This selection is not valid
Copy and past areas cannot overlap unless they'er the same size and shape
107 行ありますが、コードは 107 行だけでなく、列全体を処理している可能性がありますか? これを修正する方法がわかりません
ありがとう
Sub f()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
On Error GoTo Skipit
HeaderNames = Array("RespID", "Subject", "Tag", "Strengths Comments", "Improvement Comments")
For l = 0 To UBound(HeaderNames)
Columns(Rows(1).Find(HeaderNames(l), , xlValues, xlWhole).Column).Cut
Columns(l + 1).Insert
Skipit:
Next
ActiveSheet.UsedRange.Offset(, l).ClearContents
Application.ScreenUpdating = True
Application.DisplayAlerts = True
On Error GoTo 0
End Sub