title: select case with variable boolean operator
body: <p>This is my first question on the forum, but reading previous questions has been enormously helpful in the project I'm working on, so already my thanks. I couldn't find an answer to this, but apologies if I overlooked something.</p>
  
  <p>I am writing an excel macro in vba, and am trying to create a select case... statement in which the expression has a variable boolean and numeric component. For example, the macro can pull "> 3" or "&lt; 3" from another worksheet.</p>
  
  <p>My hope had been that I could assign to a string all of these parameters, i.e.:</p>
  
  <pre><code>test1 = "is " &amp; BoolOperator1 &amp; " " &amp; NumericValue1
  </code></pre>
  
  <p>and then</p>
  
  <pre><code>Select case ValuetoCompare
      Case test1
        'Do something
      Case test2
         '...
  </code></pre>
  
  <p>Is there a way to do this? I suppose the alternative would be to nest the case with the numeric variable inside a select function that determines the operator, but I thought this would be more elegant.</p>
  
  <p>Thanks in advance for your guidance--</p>
  
  <p>Josh</p>