title: VBA Autofilter with Inputbox
body: <p>So I am running into a problem with being able to specify numerical values. For example, I want to be able to do > 100 for the filter utilizing the input box. I can only do words like Action, AMERICAS, and etc. </p>
  
  <pre><code>Sub Criteria_Region_NewSheet()
     Dim x As Long
     Dim myValue As Variant
     Dim mysheet As Variant
  
     Application.ScreenUpdating = False
  
     mysheet = ActiveSheet.Name
  
     On Error Resume Next
     y = Application.WorksheetFunction.Match("*", Range(Cells(1, 3), Cells(20, 3)), 0)
     'Region is the criteria
     x = Application.WorksheetFunction.Match("Sales", Range(Cells(1, y), Cells(100, y)), 0)
     On Error GoTo 0
  
     myValue = InputBox("Input Region")
  
     On Error Resume Next
     'Filter
     Range(Cells(x, y), Cells(x, y)).AutoFilter Field:=x, Criteria1:=myValue
     On Error GoTo 0
  
     'Copies Information
     Range(Cells(x, y), Cells(x, y)).Select
     ActiveSheet.AutoFilter.Range.Copy
     Worksheets.Add.Paste
  
     'Formats columns
     Columns("A:X").EntireColumn.AutoFit
     Range("A1:F100").EntireRow.AutoFit
  
     ' Unfilter
     Worksheets(mysheet).ShowAllData
  
     Application.ScreenUpdating = True
  
  End Sub
  </code></pre>