ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Checking to see whether a string contains a certain character (https://www.excelbanter.com/excel-programming/317836-checking-see-whether-string-contains-certain-character.html)

ajitpalsingh200[_21_]

Checking to see whether a string contains a certain character
 

Is there any way to check whether string "chair" contains "*" or not?

thankx in advance


--
ajitpalsingh200
------------------------------------------------------------------------
ajitpalsingh200's Profile: http://www.excelforum.com/member.php...o&userid=16150
View this thread: http://www.excelforum.com/showthread...hreadid=320533


Nikos Yannacopoulos[_5_]

Checking to see whether a string contains a certain character
 
Use function InStr():

InStr(1, "chair", "*") returns 0 bcause * isn't found in "chair";
InStr(1, "chair", "h") returns 2, because h is found in the second position
in "chair" starting from 1.

HTH,
Nikos

"ajitpalsingh200" wrote in
message ...

Is there any way to check whether string "chair" contains "*" or not?

thankx in advance


--
ajitpalsingh200
------------------------------------------------------------------------
ajitpalsingh200's Profile:

http://www.excelforum.com/member.php...o&userid=16150
View this thread: http://www.excelforum.com/showthread...hreadid=320533





All times are GMT +1. The time now is 06:03 AM.

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