One way:
Dim vWidths As Variant
Dim i As Long
Application.ScreenUpdating = False
Range("C:AA,AC:AC,AF:AG,AI:DH,DK:EZ").Delete Shift:=xlToLeft
vWidths = Array(10.57, 6.29, 32.57, 15, 7.57, 12.57, 10.86)
For i = 1 To UBound(vWidths)
Columns(i).ColumnWidth = vWidths(i)
Next i
Range("B2").AutoFilter Field:=2, Criteria1:="TRUE"
Application.ScreenUpdating = True
Note that you almost never need to select anything. Using the range
objects directly (i.e., Range("C:AA...").Delete) is faster, shorter,
and, IMO, easier to maintain.
In article ,
"jdengel" wrote:
is there a way to shorten this macro to make it run faster
|