• 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 Paste Function not Working

Status
Not open for further replies.

Dokat

Member
Hi,

I have below formula where i like to cut cells from Workskeets("WBC").Range("W22") to Workskeets("WBC").Range("B4:B33") and AB22 to B34:B64. For some reason it doesnt copy and paste to the range on Summary sheet. What may cause this issue?


Code:
Sub MoveRangeWBC()

Worksheets("WBC").Range("E25:E60").Copy Destination:=Worksheets("Summary").Range("C4")
Worksheets("WBC").Range("W25:W60").Copy Destination:=Worksheets("Summary").Range("D4")
Worksheets("WBC").Range("E25:E60").Copy Destination:=Worksheets("Summary").Range("C39")
Worksheets("WBC").Range("AB25:AB60").Copy Destination:=Worksheets("Summary").Range("D39")

Dim iCntr
Dim rng As Range
Set rng = Worksheets("Summary").Range("B4:F1111")

For iCntr = rng.Row + rng.Rows.Count - 1 To rng.Row Step -1
If Application.WorksheetFunction.CountA(Rows(iCntr)) = 0 Then Rows(iCntr).EntireRow.Delete

Next
With Worksheets("WBC")

.Range("W22").Copy Destination:=Worksheets("Summary").Range("B4:B33")
.Range("W22").Clear
.Range("AB22").Copy Destination:=Worksheets("Summary").Range("B34:B64")
.Range("AB22").Clear

End With

End Sub
 
Status
Not open for further replies.
Back
Top