View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Does the cell contain the character "-" within the string?

=IF(LEN(SUBSTITUTE(A1,"-",""))=LEN(A1),FALSE,TRUE)


--
Gary's Student


"Eric" wrote:

Does anyone know how to determine the cell containing the character "-" with
the string? for example
In cell A1, =" - ", which include the character "-", then return true in B1.
Thank for any suggestion
Eric