Reputation: 1
Please help, this code only runs in one worksheet if code to consider "Range to ActivateSheet.Paste". I want to run this to all sheets, but when I input the code, below, there's an appearing error "Next Without For". Appreciate any insights :)
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Activate
Range("G25").Select
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlToRight)).Select
Application.CutCopyMode = False
Selection.Copy
Range("E25").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 2).Range("A1:E1").Select
Range(Selection, Selection.End(xlUp)).Select
ActiveCell.Activate
ActiveSheet.Paste
Next ws End Sub
Upvotes: 0
Views: 32
Reputation: 1
Just figure out the solution. Removing Application.CutCopyMode = False and ActiveCell.Activate, placing E
Upvotes: 0