Celly
Board Regular
- Joined
- Jan 29, 2015
- Messages
- 84
- Office Version
- 2016
- Platform
- Windows
Hello!
So I've tracked down a performance issue on a Excel 2016 project to AutoFilter calls. The example below is simplified. The workbook has a lot of worksheets which employ a lot of autofiltering. The issue seems to be that each field of the filters are added one by one, and I employ up to ten fields for some of my filters. Excel seems to get lathered from this task and shows a flickering wait cursor. The usual screenupdating and enableevents properties don't prevent the thrashing. Any thoughts for how to speed this up?
So I've tracked down a performance issue on a Excel 2016 project to AutoFilter calls. The example below is simplified. The workbook has a lot of worksheets which employ a lot of autofiltering. The issue seems to be that each field of the filters are added one by one, and I employ up to ten fields for some of my filters. Excel seems to get lathered from this task and shows a flickering wait cursor. The usual screenupdating and enableevents properties don't prevent the thrashing. Any thoughts for how to speed this up?
VBA Code:
Application.ScreenUpdating = False
Application.Calculation = xlManual
Application.EnableEvents = False
' clear any filters and start over
Sheet1.AutoFilterMode = False
[FilterRange].AutoFilter field:=1, VisibleDropDown:=False
[FilterRange].AutoFilter field:=2, Criteria1:="N", VisibleDropDown:=False
[FilterRange].AutoFilter field:=3, VisibleDropDown:=True
[FilterRange].AutoFilter field:=4, VisibleDropDown:=False
[FilterRange].AutoFilter field:=5, Criteria1:="<>0", VisibleDropDown:=False
[FilterRange].AutoFilter field:=6, VisibleDropDown:=False
[FilterRange].AutoFilter field:=7, VisibleDropDown:=False
[FilterRange].AutoFilter field:=8, VisibleDropDown:=False
[FilterRange].AutoFilter field:=9, Criteria1:="<>0", VisibleDropDown:=False