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

Shorter Table Sort Code

rolo

Member
Hello,

I use Excel 2016
Suppose I need to sort my table by column 1 - ascending
If I record a sort action, the recorded code is too long.

I need to know if this shorter sort code is safe:

Code:
Range("MyTableName").Sort _
Key1:=Range("MyTableName").Cells(1), Order1:=xlAscending, Header:=xlYes

Thanks!
 
Back
Top