Search for text in a formula


Posted by Omar on August 28, 2001 11:16 PM

How can I search a text, like "[" in a formula?



Posted by Nandor on August 28, 2001 11:45 PM


Try this :-

Dim cell As Range
For Each cell In Selection
If cell.HasFormula Then
If InStr(1, cell.Formula, "[", vbTextCompare) > 0 Then
MsgBox "The formula in " & cell.Address(False, False) & " contains "" [ """
End If
End If
Next