title: Custom Excel VBA function returning error in some cases, not in other
body: <p>My function is supposed to check a cell for a string, and then return that string if its present, and return an empty string if it's not. The first two parts are working fine--it checks, and it returns the string it it's present, but if the string isn't present, it returns an error (#value). What's happening?</p>
  
  <pre><code>Function Keyword(cell As Range, word As String)
    'checks given cell for keyword, returns keyword if present
    If (WorksheetFunction.IsNumber(WorksheetFunction.Search(word, cell.Range("A1"), 1))) Then
       Keyword = word + ", "
    Else: Keyword = ""
    'returns empty string if not present
    End If
  End Function
  </code></pre>
  
  <p>Call it like this: =Keyword(H2,"LED")</p>