{"id":1594,"date":"2020-07-03T16:28:49","date_gmt":"2020-07-03T23:28:49","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=1594"},"modified":"2020-12-23T10:11:20","modified_gmt":"2020-12-23T18:11:20","slug":"how-to-check-excel-if-cell-contains-partial-text","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=1594","title":{"rendered":"How to Check Excel if Cell Contains Partial Text"},"content":{"rendered":"\n<p>To check&nbsp;<strong>if a cell contains specific text<\/strong>, you can use the ISNUMBER and the SEARCH function in&nbsp;<strong>Excel<\/strong>. There&#8217;s no CONTAINS function in Excel.<\/p>\n\n\n\n<p>1. To find the position of a substring in a text string, use the\u00a0SEARCH function. <\/p>\n\n\n\n<p>= SEARCH(B2,A2)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.excel-easy.com\/examples\/images\/contains-specific-text\/search-function.png\" alt=\"Search Function in Excel\" title=\"Search Function in Excel\"\/><\/figure>\n\n\n\n<p>Explanation: &#8220;duck&#8221; found at position 10, &#8220;donkey&#8221; found at position 1, cell A4 does not contain the word &#8220;horse&#8221; and &#8220;goat&#8221; found at position 12.<\/p>\n\n\n\n<p>2. Add the ISNUMBER function. The ISNUMBER function returns TRUE if a cell contains a number, and FALSE if not.   <\/p>\n\n\n\n<p>= ISNUMBER(SEARCH(B2,A2))<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.excel-easy.com\/examples\/images\/contains-specific-text\/isnumber-function.png\" alt=\"IsNumber Function\" title=\"IsNumber Function\"\/><\/figure>\n\n\n\n<p>Explanation: cell A2&nbsp;<strong>contains<\/strong>&nbsp;the word &#8220;duck&#8221;, cell A3 contains the word &#8220;donkey&#8221;, cell A4 does not contain the word &#8220;horse&#8221; and cell A5 contains the word &#8220;goat&#8221;.<\/p>\n\n\n\n<p>3. You can also check if a cell contains specific text, without displaying the substring. Make sure to enclose the substring in double quotation marks.<\/p>\n\n\n\n<p>= ISNUMBER(SEARCH(&#8220;DUCT&#8221;,A2))<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.excel-easy.com\/examples\/images\/contains-specific-text\/double-quotation-marks.png\" alt=\"Double Quotation Marks\" title=\"Double Quotation Marks\"\/><\/figure>\n\n\n\n<p>4. To perform a case-sensitive search, replace the SEARCH function with the FIND function.<\/p>\n\n\n\n<p>= ISNUMBER(FIND(B2,A2))<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.excel-easy.com\/examples\/images\/contains-specific-text\/case-sensitive-search.png\" alt=\"Case-sensitive Search\" title=\"Case-sensitive Search\"\/><\/figure>\n\n\n\n<p>Explanation: the formula in cell C3 returns FALSE now. Cell A3 does not contain the word &#8220;donkey&#8221; but contains the word &#8220;Donkey&#8221;.<\/p>\n\n\n\n<p>5. Add the\u00a0IF function. The formula below (case-insensitive) returns &#8220;Found&#8221; if a cell contains specific text, and &#8220;Not Found&#8221; if not.<\/p>\n\n\n\n<p>= IF(ISNUMBER(SEARCH(B2,A2)),&#8221;FOUND&#8221;,&#8221;NOT FOUND&#8221;)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.excel-easy.com\/examples\/images\/contains-specific-text\/check-if-a-cell-contains-specific-text.png\" alt=\"Check If a Cell Contains Specific Text\" title=\"Check If a Cell Contains Specific Text\"\/><\/figure>\n\n\n\n<p>6. You can also use the IF and the COUNTIF function in Excel to check if a cell contains specific text. However, the COUNTIF function is always case-insensitive.<\/p>\n\n\n\n<p>= IF(COUNTIF(A2,&#8221;*&#8221;&amp;B2&amp;&#8221;*&#8221;), &#8220;FOUND&#8221;, &#8220;NOT FOUND&#8221;)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.excel-easy.com\/examples\/images\/contains-specific-text\/if-and-countif-function.png\" alt=\"If and Countif Function\" title=\"If and Countif Function\"\/><\/figure>\n\n\n\n<p>Explanation: the formula in cell C2 reduces to =IF(COUNTIF(A2,&#8221;*duck*&#8221;),&#8221;Found&#8221;,&#8221;Not Found&#8221;). An asterisk (*) matches a series of zero or more characters. Visit our page about the&nbsp;COUNTIF function&nbsp;to learn all you need to know about this powerful function.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To check&nbsp;if a cell contains specific text, you can use the ISNUMBER and the SEARCH function in&nbsp;Excel. There&#8217;s no CONTAINS function in Excel. 1. To find the position of a substring in a text string, use the\u00a0SEARCH function. = SEARCH(B2,A2) Explanation: &#8220;duck&#8221; found at position 10, &#8220;donkey&#8221; found at position 1, cell A4 does not <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=1594\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[10,18],"tags":[],"class_list":["post-1594","post","type-post","status-publish","format-standard","hentry","category-microsoft","category-microsoft-office"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/1594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1594"}],"version-history":[{"count":1,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/1594\/revisions"}],"predecessor-version":[{"id":2839,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/1594\/revisions\/2839"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}