Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Compare the strings
I want to check if the string contains a particular word, say, string "World" doesn't have "ed". What the operator shall I use here? Thanks. David -- yangyh ------------------------------------------------------------------------ yangyh's Profile: http://www.excelforum.com/member.php...o&userid=26883 View this thread: http://www.excelforum.com/showthread...hreadid=465743 |
#2
|
|||
|
|||
yangyh Wrote: I want to check if the string contains a particular word, say, string "World" doesn't have "ed". What the operator shall I use here? Thanks. David Try this ... =ISERROR(SEARCH(\"ED\",A1)) where A1 contains the string that you want to search. Regards. -- BenjieLop ------------------------------------------------------------------------ BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019 View this thread: http://www.excelforum.com/showthread...hreadid=465743 |
#3
|
|||
|
|||
Thank you. I could not find the SEARCH function in VBA help. Could you tell me the syntex? Thanks. David -- yangyh ------------------------------------------------------------------------ yangyh's Profile: http://www.excelforum.com/member.php...o&userid=26883 View this thread: http://www.excelforum.com/showthread...hreadid=465743 |
#4
|
|||
|
|||
In VBA you can use the InStr function, like
If InStr(1, TheString, "World") 0 Then MsgBox "The string exists in there" End If -- Regards, Juan Pablo González Excel MVP "yangyh" wrote in message ... Thank you. I could not find the SEARCH function in VBA help. Could you tell me the syntex? Thanks. David -- yangyh ------------------------------------------------------------------------ yangyh's Profile: http://www.excelforum.com/member.php...o&userid=26883 View this thread: http://www.excelforum.com/showthread...hreadid=465743 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I compare Excel files | Excel Discussion (Misc queries) | |||
How do I compare FORMULAS in two workbooks | Excel Discussion (Misc queries) | |||
How can I compare the contents of two Excel files? | Excel Discussion (Misc queries) | |||
Is there a way to compare 2 spreadsheets with Excel? | Excel Discussion (Misc queries) | |||
Compare cells/columns and highlight matching text strings | Excel Worksheet Functions |