ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Does the cell contain the character "-" within the string? (https://www.excelbanter.com/excel-discussion-misc-queries/121330-does-cell-contain-character-within-string.html)

Eric

Does the cell contain the character "-" within the string?
 
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

Gary''s Student

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


Eric

Does the cell contain the character "-" within the string?
 
Thank you very much
Eric

"Gary''s Student" wrote:

=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


JMay

Does the cell contain the character "-" within the string?
 
FYI
Also there's:
=ISNUMBER(FIND("-",A1))


"Eric" wrote in message
:

Thank you very much
Eric

"Gary''s Student" wrote:

=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



Dave Peterson

Does the cell contain the character "-" within the string?
 
A couple mo
=countif(a1,"*-*")0
=isnumber(search("-",a1))

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


--

Dave Peterson


All times are GMT +1. The time now is 07:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com