ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Q: search in string (https://www.excelbanter.com/excel-discussion-misc-queries/3057-q-search-string.html)

JIM.H.

Q: search in string
 
Hello,
How would you search a string from another and check the return code. I was
using Search(), excel does not recognize it.
Thanks,
Jim.


Aladin Akyurek

Would you post the formula along with the values involved?

JIM.H. wrote:
Hello,
How would you search a string from another and check the return code. I was
using Search(), excel does not recognize it.
Thanks,
Jim.


JIM.H.

retValue = Search("X", "XXXX", 1)
I get Sun or Function not defined on Search when I try to run it.


"Aladin Akyurek" wrote:

Would you post the formula along with the values involved?

JIM.H. wrote:
Hello,
How would you search a string from another and check the return code. I was
using Search(), excel does not recognize it.
Thanks,
Jim.



Aladin Akyurek

Not sure where you're heading, maybe:

=ISNUMBER(SEARCH("X","XXXX"))

would return TRUE if the substring "X" is part of the string "XXXX",
otherwise FALSE.

JIM.H. wrote:
retValue = Search("X", "XXXX", 1)
I get Sun or Function not defined on Search when I try to run it.


"Aladin Akyurek" wrote:


Would you post the formula along with the values involved?

JIM.H. wrote:

Hello,
How would you search a string from another and check the return code. I was
using Search(), excel does not recognize it.
Thanks,
Jim.



JIM.H.

Thanks Aladin. I am trying to search string in a string in the module in
excel, not in the cell. It works in the cell, but not working in the module.

"Aladin Akyurek" wrote:

Not sure where you're heading, maybe:

=ISNUMBER(SEARCH("X","XXXX"))

would return TRUE if the substring "X" is part of the string "XXXX",
otherwise FALSE.

JIM.H. wrote:
retValue = Search("X", "XXXX", 1)
I get Sun or Function not defined on Search when I try to run it.


"Aladin Akyurek" wrote:


Would you post the formula along with the values involved?

JIM.H. wrote:

Hello,
How would you search a string from another and check the return code. I was
using Search(), excel does not recognize it.
Thanks,
Jim.




Dave Peterson

Do you mean VBA?

If yes, take a look at InStr in VBA's help.



JIM.H. wrote:

Thanks Aladin. I am trying to search string in a string in the module in
excel, not in the cell. It works in the cell, but not working in the module.

"Aladin Akyurek" wrote:

Not sure where you're heading, maybe:

=ISNUMBER(SEARCH("X","XXXX"))

would return TRUE if the substring "X" is part of the string "XXXX",
otherwise FALSE.

JIM.H. wrote:
retValue = Search("X", "XXXX", 1)
I get Sun or Function not defined on Search when I try to run it.


"Aladin Akyurek" wrote:


Would you post the formula along with the values involved?

JIM.H. wrote:

Hello,
How would you search a string from another and check the return code. I was
using Search(), excel does not recognize it.
Thanks,
Jim.




--

Dave Peterson


All times are GMT +1. The time now is 12:01 PM.

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