Skip to content

Instantly share code, notes, and snippets.

@francisluong
Last active August 29, 2015 14:02
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 francisluong/7010c4f7e48369d41f98 to your computer and use it in GitHub Desktop.
Save francisluong/7010c4f7e48369d41f98 to your computer and use it in GitHub Desktop.
Yet another Excel formatter
Sub cfm_latency_report()
'
' cfm_latency_report Macro
'
'
Range("A1").CurrentRegion.Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("A1").CurrentRegion, , xlYes).Name = _
"Table1"
Range("Table1[#All]").Select
ActiveSheet.ListObjects("Table1").TableStyle = "TableStyleLight11"
Columns("A:A").EntireColumn.AutoFit
Columns("A:A").EntireColumn.AutoFit
Columns("B:B").EntireColumn.AutoFit
Columns("B:B").EntireColumn.AutoFit
Columns("D:D").EntireColumn.AutoFit
Columns("D:D").EntireColumn.AutoFit
Columns("G:G").EntireColumn.AutoFit
ActiveWindow.LargeScroll ToRight:=1
Columns("H:H").EntireColumn.AutoFit
ActiveWindow.LargeScroll ToRight:=-1
Range("A2").Select
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment