title: Excel Autofilter all but variable value
body: <p>So I need to filter all the values in a row except one.
  I got it to work, using this part of code, which obviously will filter on everything, but "Belgium", but I need there to be variable.</p>
  
  <pre><code>Dim myValue As Variant
  myValue = InputBox("Which country to exclude? ")
  
  Range("AB1").Select
  ActiveSheet.Range("$B$1:$BY$319696").AutoFilter Field:=27, Criteria1:="&lt;&gt;Belgium"
  </code></pre>
  
  <p>For the version of filter where I filter on a particular country the variable works just fine:</p>
  
  <pre><code>Dim myValue As Variant
  myValue = InputBox("Which country to filter on: ")
  
  Range("AB1").Select
  ActiveSheet.Range("$B$1:$BY$319696").AutoFilter Field:=27, Criteria1:= _
      myValue
  ActiveWindow.SmallScroll Down:=-30
  </code></pre>
  
  <p>So why would this not work: </p>
  
  <pre><code>ActiveSheet.Range("$B$1:$BY$319696").AutoFilter Field:=27, Criteria1:= &lt;&gt;myValue
  </code></pre>
  
  <p>Also I do not know why it is structured like this, it was generated from Record Macro, especially the _ 
                <code>Criteria1:= _
                  myValue</code></p>