title: How to make a VBA function which works as boolean?
body: <p>I have given a list of names. For example:</p>
  
  <pre><code>Hanna-liis
  Hanna-maria
  Hanna-liina
  Helgi-maie
  Helju-mai
  </code></pre>
  
  <p>And then I have this name which is given with symbols H???-m???.
  I have to make a function which works as boolean and the function has to answer if the words match the one which is in symbols- true or false.</p>
  
  <p>For example Helgi-maie matches H???-m??? but Helju-mai doesnt. So Helgi-maie is true and helju-mai is false. </p>
  
  <p>I came up with this</p>
  
  <pre><code>Function võrdlus(sõna, mask) As Boolean 
      võrdlus=true or false 
      If Left("A4", 1) = Left("B1", 1) And Left("A4", 7) = Left("B1", 7) Then
          võrdlus = True 
      Else 
          võrdlus = False 
      End If
  </code></pre>
  
  <p>This is all I got now. But it gives me that all the answers are correct.</p>