If you want to search for a specific string within another string, this can be done by combining a number of Excel formulas . For example you may want to find a string “esp” in string “yespakto”. Suppose this string is in cell D7. To solve this problem use following formula
=IF(ISNUMBER(SEARCH(”esp“,D7)),MID(D7,SEARCH(“esp“,D7),LEN(”esp“)),”")
note bold face “esp” in the string, this is the string which will be searched in cell D7.
after applying you will get result as shown in figure below. Here cell “E” contains your desired results.
search string in excel
If you feel any problem in foumal after copy paste. Try typing foumla manaually.
nice to learn a good formula.. thanks
this formula is good one as it shows blank space when the string is not found.
seems that the following would provide the same result and be a bit simpler.
=IF( ISNUMBER(SEARCH(”esp”,D7)), “esp”, “”)
You are right Mr PBH. Thanks for your input.
very helpful formula,
also by using the formula this way you can eliminate #VALUE! problem when search fail.
E7=IF(ISNUMBER(SEARCH(E$5,D7),”income”,”expense”)
E8=IF(ISNUMBER(SEARCH(E$5,D8),”income”,”expense”)
E9 = ..
E5 = “sale”
D7 = “food sale” E7 = “income”
D8 = “drink sale” E8 = “income”
D9 = “repair” E9 = “expense”