ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Checking for the existence of a characted in a string (https://www.excelbanter.com/excel-discussion-misc-queries/94948-checking-existence-characted-string.html)

Peter Rooney

Checking for the existence of a characted in a string
 
Whilst I'm being lazy, what's the best way to check for the existence of a
character (say "-") in a string?

My brain's gone to sleep this afternoon - sorry, y'all!
Thanks in advance

Pete

starguy

Checking for the existence of a characted in a string
 

say you want to check ; in a cell, following formula will return yes if
it finds and no if it did not.

=IF(ISERROR(FIND(";",A1)),"not","yes")


--
starguy
------------------------------------------------------------------------
starguy's Profile: http://www.excelforum.com/member.php...o&userid=32434
View this thread: http://www.excelforum.com/showthread...hreadid=553633


Peter Rooney

Checking for the existence of a characted in a string
 
Good morning,
This works a treat.
Thanks very much

Pete

"starguy" wrote:


say you want to check ; in a cell, following formula will return yes if
it finds and no if it did not.

=IF(ISERROR(FIND(";",A1)),"not","yes")


--
starguy
------------------------------------------------------------------------
starguy's Profile: http://www.excelforum.com/member.php...o&userid=32434
View this thread: http://www.excelforum.com/showthread...hreadid=553633




All times are GMT +1. The time now is 08:24 PM.

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