Contact Us

How To Use “If Cell Contains” Formulas in Excel

Send Us A Message

Formulas in Excel If Cell Contains
Rate this post

Excel is a powerful software application that enables users to manipulate and analyze data in a variety of ways. Formulas, especially formulas in Excel, are one of its most valuable features for extracting specific information from data sets. Excel has countless formulas, and they play a crucial role in performing various calculations and data manipulations.

The “if cell contains, then” function is one of the most commonly used formulas in Excel. Using this formula, the user can check if a certain condition within a cell is met, output a value, or perform an action based on the outcome of that check.

Moreover, for example, to highlight or delete cells that contain a certain keyword, you could use the “if cell contains” function along with other relevant Excel formulas to achieve the desired result. Understanding and effectively using formulas in Excel can significantly enhance your ability to work with and derive insights from data.

Excel Formula: If cell contains

Generic formula
=IF(ISNUMBER(SEARCH("abc",A1)),A1,"")
Summary

To test for cells that contain certain text, you can use a formula that uses the IF function together with the SEARCH and ISNUMBER functions.  In the example shown, the formula in C5 is:

=IF(ISNUMBER(SEARCH("abc",B5)),B5,"")

If you want to check whether or not the A1 cell contains the text “Example”, you can run a formula that will output “Yes” or “No” in the B1 cell. There are a number of different ways you can put these formulas to use. At the time of writing, Excel is able to return the following variations:

  • If cell contains any value
  • If cell contains text
  • If cell contains number
  • If cell contains specific text
  • If cell contains certain text string
  • If cell contains one of many text strings
  • If cell contains several strings

Using these scenarios, you’re able to check if a cell contains text, value, and more.

Explanation: If Cell Contains

One limitation of the IF function is that it does not support Excel wildcards like “?” and “*”. This simply means you can’t use IF by itself to test for text that may appear anywhere in a cell.

One solution is a formula that uses the IF function together with the SEARCH and ISNUMBER functions. For example, if you have a list of email addresses, and want to extract those that contain “ABC”, the formula to use is this:

=IF(ISNUMBER(SEARCH("abc",B5)),B5,""). Assuming cells run to B5

If “abc” is found anywhere in a cell B5, IF will return that value. If not, IF will return an empty string (“”). This formula’s logical test is this bit:

ISNUMBER(SEARCH("abc",B5))

Using “if cell contains” formulas in Excel

The guides below were written using the latest Microsoft Excel 2019 for Windows 10. Some steps may vary if you’re using a different version or platform. Contact our experts if you need any further assistance.

1. If a cell contains any value, then return a value

This scenario allows you to return values based on whether or not a cell contains any value at all. For example, we’ll be checking whether or not the A1 cell is blank or not, and then return a value depending on the result.

  • Select the output cell, and use the following formula: =IF(cell<>””, value_to_return, “”).
  • For our example, the cell we want to check is A2, and the return value will be No. In this scenario, you’d change the formula to =IF(A2<>””, “No”, “”).
  • Since the A2 cell isn’t blank, the formula will return “No” in the output cell. If the cell you’re checking is blank, the output cell will also remain blank.

2. If a cell contains text/number, then return a value

With the formula below, you can return a specific value if the target cell contains any text or number. The formula will ignore the opposite data types.

Check for text

  • To check if a cell contains text, select the output cell, and use the following formula: =IF(ISTEXT(cell), value_to_return, “”).
  • For our example, the cell we want to check is A2, and the return value will be Yes. In this scenario, you’d change the formula to =IF(ISTEXT(A2), “Yes”, “”).

 

  • Because the A2 cell does contain text and not a number or date, the formula will return “Yes” into the output cell.

Check for a number or date

  • To check if a cell contains a number or date, select the output cell, and use the following formula: =IF(ISNUMBER(cell), value_to_return, “”).
  • For our example, the cell we want to check is D2, and the return value will be Yes. In this scenario, you’d change the formula to =IF(ISNUMBER(D2), “Yes”, “”).

  • Because the D2 cell does contain a number and not text, the formula will return “Yes” into the output cell.

 If cell contains specific text, then return a value

To find a cell that contains specific text, use the formula below.

  • Select the output cell, and use the following formula: =IF(cell=”text”, value_to_return, “”).
  • For our example, the cell we want to check is A2, the text we’re looking for is “example”, and the return value will be Yes. In this scenario, you’d change the formula to =IF(A2=”example”, “Yes”, “”).

 

  • Because the A2 cell does consist of the text “example”, the formula will return “Yes” into the output cell.

4. If cell contains specific text, then return a value (case-sensitive)

To find a cell that contains specific text, use the formula below. This version is case-sensitive, meaning that only cells with an exact match will return the specified value.

  • Select the output cell, and use the following formula: =IF(EXACT(cell,”case_sensitive_text”), “value_to_return”, “”).
  • For our example, the cell we want to check is A2, the text we’re looking for is “EXAMPLE”, and the return value will be Yes. In this scenario, you’d change the formula to =IF(EXACT(A2,”EXAMPLE”), “Yes”, “”).
  • Because the A2 cell does consist of the text “EXAMPLE” with the matching case, the formula will return “Yes” into the output cell.

5. If cell does not contain specific text, then return a value

The opposite version of the previous section. If you want to find cells that don’t contain a specific text, use this formula.

  • Select the output cell, and use the following formula: =IF(cell=”text”, “”, “value_to_return”).
  • For our example, the cell we want to check is A2, the text we’re looking for is “example”, and the return value will be No. In this scenario, you’d change the formula to =IF(A2=”example”, “”, “No”).

  • Because the A2 cell does consist of the text “example”, the formula will return a blank cell. On the other hand, other cells return “No” into the output cell.

6. If cell contains one of many text strings, then return a value

This formula should be used if you’re looking to identify cells that contain at least one of many words you’re searching for.

  • Select the output cell, and use the following formula: =IF(OR(ISNUMBER(SEARCH(“string1”, cell)), ISNUMBER(SEARCH(“string2”, cell))), value_to_return, “”).
  • For our example, the cell we want to check is A2. We’re looking for either “tshirt” or “hoodie”, and the return value will be Valid. In this scenario, you’d change the formula to =IF(OR(ISNUMBER(SEARCH(“tshirt”,A2)),ISNUMBER(SEARCH(“hoodie”,A2))),”Valid “,””).

  • Because the A2 cell does contain one of the text values we searched for, the formula will return “Valid” into the output cell.

To extend the formula to more search terms, simply modify it by adding more strings using ISNUMBER(SEARCH(“string”, cell)).

7. If cell contains several of many text strings, then return a value

This formula should be used if you’re looking to identify cells that contain several of the many words you’re searching for. For example, if you’re searching for two terms, the cell needs to contain both of them in order to be validated.

  • Select the output cell, and use the following formula: =IF(AND(ISNUMBER(SEARCH(“string1”,cell)), ISNUMBER(SEARCH(“string2″,cell))), value_to_return,””).
  • For our example, the cell we want to check is A2. We’re looking for “hoodie” and “black”, and the return value will be Valid. In this scenario, you’d change the formula to =IF(AND(ISNUMBER(SEARCH(“hoodie”,A2)),ISNUMBER(SEARCH(“black”,A2))),”Valid “,””).

  • Because the A2 cell does contain both of the text values we searched for, the formula will return “Valid” to the output cell.

Final Thoughts

We hope you found this tutorial helpful in learning how to apply “if cell contains” formulas in Microsoft Excel. You can now see which cells include values, text, numbers, and other data. This allows you to conveniently explore, manage, and analyze your data. If you’re interested in expanding your Excel skills, you may also want to explore “Formulas in Excel” to enhance your ability to perform various calculations and manipulations within your spreadsheets.

Send Us A Message

Best Free PDF Reader Apps for Android, iOS, PC & Mobile Devices 2025

Compare the best free PDF reader software and apps for Windows PC, Mac, Android phones, iOS devices, and tablets. Download premium tools for instant digital magazine reading on any mobile device.

Choosing the best PDF reader app for your Android, iOS, or PC device enhances performance, security, and mobile reading experience. Compare free software downloads and premium subscription options.

Windows & Mac Software

Download free apps for PC and laptop

Android & iOS Apps

Best mobile apps for smartphones & tablets

Browser Tools

Chrome, Firefox, Safari PDF viewers

App Settings

Optimize software for mobile devices

Best PDF Reader Software for Windows PC & Mac - Free Download 2025

Adobe Acrobat Reader - Free Download for Windows & Mac

Download Adobe Acrobat Reader free software for Windows 10, Windows 11, and Mac computers. Industry-leading PDF app with premium subscription options for professionals and businesses.

Premium Features
  • Free download for PC and Mac
  • Professional annotation tools
  • Cloud storage integration
  • Mobile app sync (Android/iOS)
Subscription Costs
  • Premium features require paid plan
  • Resource-heavy on older PCs
  • Subscription pricing varies

Top PDF Software Comparison - Free vs Paid Apps 2025

Software/App Platform (PC/Mobile) Price/Subscription Rating
Adobe Acrobat Reader Windows, Mac, Android, iOS Free / Premium $14.99/mo 9.5/10
Foxit PDF Reader Windows PC, Mobile Apps Free / Pro $139 9.0/10
Sumatra PDF Windows 10/11 Free Download 8.5/10
Preview (Built-in App) MacOS, iOS Devices Free with Mac/iPhone 8.0/10

Foxit Reader - Best Free Alternative Software

Download Foxit PDF Reader free for Windows PC and Mac. Lightweight software alternative to Adobe with mobile app versions for Android and iOS devices. No subscription required for basic features.

Best PDF Reader Apps for Android & iOS - Free Mobile Downloads 2025

Adobe Acrobat Mobile App - Android & iOS Download

Download free Adobe Acrobat mobile app for Android phones, iOS devices, tablets, and iPads. Premium subscription unlocks professional features with cloud storage sync across all devices.

Mobile Editing Tools

Annotate PDFs on Android & iOS

Cloud Storage Apps

Sync files across mobile devices

OCR Technology

Convert scans to text on phone

Mobile Sharing

Send files from Android/iOS apps

Xodo PDF - Best Free App for Android & iOS Devices

Download Xodo free PDF reader app for Android smartphones, iOS devices, and tablets. Top-rated mobile software with no subscription fees or in-app purchases required.

Free Mobile App Features
  • Completely free - no subscription
  • Available on Android & iOS
  • Fast mobile performance
  • Works offline on phone/tablet
Premium Upgrades
  • Advanced editing requires premium
  • Cloud storage limited in free app

Mobile App Tip: Download PDF reader apps that support offline reading on Android phones and iOS devices to access magazines without internet connection or data usage.

Best Web Browsers for PDF Reading - Chrome, Firefox, Safari 2025

Google Chrome Browser - Free Download with Built-in PDF Viewer

Download Google Chrome free browser for Windows PC, Mac, Android, and iOS devices. Built-in PDF viewer with instant rendering - no additional software or app downloads required.

Chrome PDF Viewer Features - Free Built-in Tool

  • Free download for PC and mobile
  • No plugin or app installation needed
  • Works on Windows, Mac, Android, iOS
  • Google Drive cloud integration
  • Fast PDF rendering on mobile devices

Mozilla Firefox - Free Browser Download for All Devices

Download Firefox free browser with PDF.js viewer for Windows, Mac, Linux PC, Android phones, and iOS devices. Privacy-focused alternative to Chrome with customizable mobile apps.

Browser (Free Download) Platform/Devices Mobile Performance Best For
Google Chrome Windows, Mac, Android, iOS Excellent on Mobile General users & businesses
Mozilla Firefox All Platforms & Devices Very Good Privacy-focused mobile users
Microsoft Edge Windows PC, Android, iOS Excellent Windows 10/11 users
Safari Browser Mac, iPhone, iPad (iOS) Good on Apple Devices Mac & iOS device owners

Browser Extension Tip: Download free browser extensions and add-ons to enhance PDF viewing on Chrome, Firefox, and Edge browsers for PC and mobile devices.