• 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.

VBA stopped working

pao13

Member
Hi. I'm attaching my workbook. Suddenly my macro stopped working. Actually it seems to be working but no data appear at sheet "P_L events up to 2 months". This is the code

Code:
Sub copy_paste1()
Dim i As Long, y As Long, z As Long
y = Sheets("events exp up to 2 months").Range("T" & Rows.Count).End(3).Row
For i = 9 To y
Sheets("P_L events up to 2 months").Range("B" & Rows.Count).End(3)(2).Value = Sheets("events exp up to 2 months").Range("R" & i).Value
Sheets("P_L events up to 2 months").Range("B" & Rows.Count).End(3)(2).Value = Sheets("events exp up to 2 months").Range("R" & i).Value
Sheets("P_L events up to 2 months").Range("C" & Rows.Count).End(3)(2).Value = Sheets("events exp up to 2 months").Range("S" & i).Value
Sheets("P_L events up to 2 months").Range("C" & Rows.Count).End(3)(2).Value = Sheets("events exp up to 2 months").Range("S" & i).Value
Sheets("P_L events up to 2 months").Range("D" & Rows.Count).End(3)(2).Value = Sheets("events exp up to 2 months").Range("T" & i).Value
Sheets("P_L events up to 2 months").Range("D" & Rows.Count).End(3)(2).Value = Sheets("events exp up to 2 months").Range("T" & i).Value
Next i
z = Sheets("P_L events up to 2 months").Range("B" & Rows.Count).End(3).Row
Sheets("P_L events up to 2 months").Range(Cells(z, "B"), Cells(z, "D")).Clear
End Sub

Thanks for any help!
 

Attachments

Back
Top