Better way to code this code snippet (copy paste) I am trying to improve upon a VBA code created through recording a macro. Can the code below be optimized (I was informed to avoid .Select as much as possible)? The code itself works fine for me though.
    Sheets(&quot;DataExport&quot;).Select
    Range(&quot;A1&quot;).Select
    Range(Selection, Selection.End(xlToRight)).Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.ClearContents

    Sheets(&quot;Analysis&quot;).Select
    Range(&quot;BX1:CI4&quot;).Select
    Selection.Copy
    Sheets(&quot;DataExport&quot;).Select
    Range(&quot;B1&quot;).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
Let me give you the following answer/advise:
As far as your first piece of code is concerned, this can be re-written as:
Sheets(&quot;DataExport&quot;).Range(&quot;A1&quot;).CurrentRegion.ClearContents

As far as the second piece of code is concerned (about the copying), I'd like to refer you to this very complete answer. (I might give you the answer but I believe you'd better try to create it, based on this URL. If you have any issues, please edit your question, we'll have another look).