Hi there,
I'm having a problem with coding that doesn't usually cause me any problems.
I've created a loop that will go through columns of data and copy and paste them onto another sheet. It looks like this:
The error I'm getting is this:![]()
FinalC = Cells(1, Columns.Count).End(xlToLeft).Column For s = 7 To FinalC Cells(5, s).Select If Cells(5, s) = "" Then Exit For Else Range(Selection.End(xlDown), Selection).Copy Sheets("csv").Activate FinalR4 = Cells(Rows.Count, 1).End(xlUp).Row Range("f" & FinalR4).Select ActiveCell.Offset(1, 0).Select ActiveSheet.Paste Sheets("Sheet1").Activate End If Sheets("Sheet1").Activate Next s
Then it highlights the End(xlToLeft) part of my code. Can anyone see anything wrong with this?![]()
Compile error: Only comments may appear after End Sub, End Function or End Property.
Thanks in advance.











LinkBack URL
About LinkBacks
Register To Reply

Bookmarks