• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy and paste range to every sheet Vba

Dokat

Member
Hi,

I have below code where i would like to copy range from sheet "HE" (G21:AO23) to every worksheet to same range except sheets "Summary" and "HE"

I am using below code however it is not copy pasting rather deleting the range. Can anyone help me with what's causing this issue?

Sub AddTargetHeader()

Application.ScreenUpdating = False

Dim i As Long

For i = 1 To Sheets.Count
Select Case Sheets(i).Name
Case "HE", "Summary"

Case Else

Sheets("HE").Range("G21:AO23") = Sheets(i).Range("G21:AO23").Value

End Select
Next

Application.ScreenUpdating = True
End Sub
 
Hi, obviously a bad logic as you wrote to put the cells values from Sheets(i) to Sheets("HE") ‼​
So just reverse the source and the destination, that's all folks !​
 
Back
Top