I have read that using .select & .activate, are bad practice and slow down the code. I am copy and pasting between sheets and am finding it is taking quite a long time to execute.
Would anyone be kind enough to tell me how I would clean up the following code? Or is this one those occasions when those two actions need to be used?
Public Sub CopyPasteClearAll() Dim N As Integer Dim M As Integer Dim ind As Integer Application.ScreenUpdating = False Sheets("nnet").Activate N = Cells(Rows.Count, "A" & i).End(xlUp).Row ind = 0 For i = N To 3 Step -1 If Len(Range("A" & i).Value) = 0 Then ind = i End If Next i Range("A" & 3, "EA" & ind - 1).Select Selection.Copy Sheets("nnetData").Activate M = Cells(Rows.Count, "A").End(xlUp).Row Range("A" & M + 1).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False Sheets("nnet").Activate