Type Mismatch error in VBA with a boolean variable <p>I'm trying to go through a range and check the names of the cells against a string "QUERIED", and if this comparison is false to put the value of the cell somewhere else. Excel is giving me a type mismatch error on the word False in the If statement below. I can't for the life of me see why. nameCheck is a Boolean variable.</p> <pre><code>Do namecheckCell = Sheets("Sheet1").Cells(namecheckRow, 6) nameCheck = True nameCheck = namecheckCell.Name Like "QUERIED" MsgBox (nameCheck) If nameCheck Is False Then Sheets("List Results").Cells(namefoundCount, 1).Value = namecheckCell.Value namefoundCount = namefoundCount + 1 End If namecheckRow = namecheckRow + 1 Loop While Not namecheckCell.Value Is Nothing </code></pre>