View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Greg Wilson Greg Wilson is offline
external usenet poster
 
Posts: 747
Default Return True if cell contains special character

Try:

Function CellHasSpecChar(c As Range) As Boolean
CellHasSpecChar = c.Value Like "*[?/*]*"
End Function

Sub TestIt()
MsgBox CellHasSpecChar(ActiveCell)
End Sub

Regards,
Greg


"linglc" wrote:

How do I test if a cell has any of the special characters e.g. *,?,/
Thanks for any help.