Skip to content

Instantly share code, notes, and snippets.

@DuongAQ
Created January 17, 2018 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DuongAQ/9679484c9a1119b9ba1c391c33dd2c4d to your computer and use it in GitHub Desktop.
Save DuongAQ/9679484c9a1119b9ba1c391c33dd2c4d to your computer and use it in GitHub Desktop.
Option Explicit
Sub Sort_Multi_Sheet() 'Excel VBA to Sort All Sheets in Workbook in Ascending Order
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Range("A2", ws.Range("G" & Rows.Count).End(xlUp)).Sort [D2], 1
Next ws
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment