This is the code i have worked with. It is showing the error 1004 that the copy area and paste area are not in the same size. Please help me with the issue?
Sheets("ESTemplate").Activate
Sheets("ESTemplate").Columns("A:B").Select
Selection.Copy
Sheets("Effort_Summary").Activate
For j = 2 To (4 + ((Sheets.Count - SheetCount) * 2))
MsgBox Sheets.Count
If Cells(3, j).Value = "Total" Then
ActiveSheet.Columns(j).Select
Selection.Insert Shift:=xlRight
Selection.Paste
ActiveSheet.Cells(3, j) = WKSheetName
Exit For
End If
Next j
Sheets("ESTemplate").Activate
Sheets("ESTemplate").Columns("A:B").Select
Selection.Copy
Sheets("Effort_Summary").Activate
For j = 2 To (4 + ((Sheets.Count - SheetCount) * 2))
MsgBox Sheets.Count
If Cells(3, j).Value = "Total" Then
ActiveSheet.Columns(j).Select
Selection.Insert Shift:=xlRight
Selection.Paste
ActiveSheet.Cells(3, j) = WKSheetName
Exit For
End If
Next j