Need to insert 2 columns from one sheet to another using vba

This is my code for copy-paste 2 columns from one sheet to another.. In which it should be pasted somewhere inside the existing table. Pls help me

 

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

ActiveSheet.Cells(3, j) = WKSheetName
Exit For
End If
Next j

Contributor Asked 8 hours ago in VBA: Macros.
Add Comment
0 Answer(s)
  • Found this useful?

    Please share using the share button above.

    If you found the answer is best answer for your question, Please mark as 'best answer' by clicking on the right tick mark icon at the left side of the answer.

    Found the answer useful and wants to credit the user, then vote the answer (vote up).

  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.