title: excel vba - custom formula for Contains()
body: <p>If i had a column like:</p>
  
  <pre><code>ColumnA
  -------
  NUMBER
  VARCHAR(50 BYTE)
  TIMESTAMP
  </code></pre>
  
  <p>I'm looking for a vba function that would work like so:</p>
  
  <p>contains("string to search for", cell to search it in)
  ie. =contains("VARCHAR",A2)
  and if the cell does contain it (anywhere in the cell - doesn't have to start or end the cell) then populate the cell (that uses the function) with "T" else "F".</p>
  
  <p>so in my example:</p>
  
  <pre><code>ColumnB
  -------
  F
  T
  F
  </code></pre>
  
  <p>Also could I then use this function inside other VBA code like so:</p>
  
  <pre><code>If Len(A2) &gt; 10 and contains("CHAR",A2) Then
   //do stuff
  End If
  </code></pre>
  
  <p>If they have to be separate functions (to use in cells returning "T"/"F" and to use in other VBA code), please provide both.</p>