title: * operator in excel VBA
body: <p>I have a following function in excel which works as expected:</p>
  <pre><code>=FILTER(Database!A2:C1947,ISNUMBER(SEARCH(G3,Database!A2:A1947)*SEARCH(G4,Database!A2:A1947)),&quot;Not found&quot;)
  </code></pre>
  <p>In this function, I have strings from A2 to C1947. out of the entire table,  I want to show only those rows which contain strings written in G3 and G4. So basically the filter function takes key1 from G3 and key2 from G4. and filter out rows that contain strings from G3 and G4.</p>
  <p>Example:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th></th>
  <th>A</th>
  <th>B</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Row1</td>
  <td>screw 5 mm helix</td>
  <td>quantity 77</td>
  </tr>
  <tr>
  <td>Row2</td>
  <td>screw 5 mm</td>
  <td>quantity 10</td>
  </tr>
  <tr>
  <td>Row3</td>
  <td>screw 10 mm helix</td>
  <td>quantity 98</td>
  </tr>
  <tr>
  <td>Row4</td>
  <td>nut 3 mm</td>
  <td>quantity 96</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>then when I enter &quot;screw&quot; in G3 and &quot;helix&quot; in G4, I get following in excel:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th></th>
  <th>A</th>
  <th>B</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Row1</td>
  <td>screw 5 mm helix</td>
  <td>quantity 77</td>
  </tr>
  <tr>
  <td>Row3</td>
  <td>screw 10 mm helix</td>
  <td>quantity 98</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>However when I write the same function in VBA, it gives error as &quot;Run time error 13, type mismatch&quot; following is my excel VBA code:</p>
  <pre><code>Dim Res As Variant
  With Application
      Res = .Filter(Sheets(&quot;Database&quot;).Range(&quot;A2:C1947&quot;), .IsNumber(.Search(Sheets(&quot;Tool&quot;).Range(&quot;G3&quot;), Sheets(&quot;Database&quot;).Range(&quot;A2:A1947&quot;)) * .Search(Sheets(&quot;Tool&quot;).Range(&quot;G4&quot;), Sheets(&quot;Database&quot;).Range(&quot;A2:A1947&quot;))), &quot;Not found&quot;)
  End With
  </code></pre>
  <p>Where is my mistake? Need an expert advice.</p>