title: EXCEL VBA Filter user input
body: <p>MY inputbox allow user to input a value into a cell. Therefore I wish to filter some input like <code>=SUM(A:A)</code> and <code>'</code> which will show nothing, and other formula or possibly entry that will affect the actual value. Thanks in advance.</p>
  
  <pre><code>Private Sub testInputBox_Click()
      Dim x As String
      Dim y As String
      Dim yDefault As String
      Dim found As Range
  
      x = InputBox("Enter Parts No.", "Edit Description")
  
      If (x &lt;&gt; "") Then
          If (WorksheetFunction.CountIf(Worksheets("Sheet1").Range("E2:E27"), x) &gt; 0) Then
              Set found = Worksheets("Sheet1").Range("E2:E27").Find(x, LookIn:=xlValues)
              yDefault = found.Offset(0, 1).Text
              y = InputBox("Amend Description", "Edit Description", yDefault)
          Else
              MsgBox ("Not found!")
          End If
  
          If (y &lt;&gt; "") Then 'Filter should be done here
              If MsgBox("Proceed to edit?", vbYesNo, "Confirmation") = vbNo Then
              Else
                  found.Offset(0, 1).Value = CStr(y)
              End If
  
          End If
      End If
  End Sub
  </code></pre>