I'd be tempted to change your ratio rule column to just a number rather than "Ratio 1"
You could then replace all your code with the following:
Public Sub sortIt()
Dim rng As Range
Dim arrFields As Variant
Dim arrRules As Variant
Dim x As Integer
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
With Sheets("Rules")
Set rng = .Range("A2").CurrentRegion.Offset(1, 2)
arrRules = rng.Resize(rng.Rows.Count - 1, rng.Columns.Count - 2).Value
arrFields = .Range("B2:B" & .Range("B2").End(xlDown).Row).Value
End With
With Sheet1.Range("B13:Q135")
For x = 1 To UBound(arrRules)
.AutoFilter Field:=arrFields(x, 1) + 1, Criteria1:=arrRules(x, 1) & arrRules(x, 2)
Next x
Sheet3.Cells.ClearContents
Set rng = .SpecialCells(xlCellTypeVisible)
If Not rng Is Nothing Then rng.Copy Sheet3.Range("A1")
End With
Sheet1.ShowAllData
Sheet3.Cells.ClearFormats
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Bookmarks