# How to check if a cell contains a text by using the IF function in Excel

August 1, 2022
1.1K Views
0

A free Office suite fully compatible with Microsoft Office

A free Office suite fully compatible with Microsoft Office

In this article, we will show you various ways to use the IF function in Excel The first argument of the IF function is referred to as the [logical_test]. This argument is required, and it should be entered as a logical value or expression that evaluates to either TRUE or FALSE.

The second argument of this function is referred to as [value_if_true]. This argument determines what value will be returned if your condition is met and evaluated to TRUE, while the third argument is referred to as [value_if_false]. This last one determines what value should be returned if your condition evaluates false. Now let’s see how we can combine it with other functions to get the desired result and check if a cell contains a text.

Tips that are provided in this article are compatible with versions 2010/2013/2016.

How to check if a cell contains a text by using the IF function in Excel: Method 1

As said before, The IF function is used to test whether a value meets a specific condition. The ISTEXT function is used to determine whether a cell contains the text.

Combining these two functions will allow you to check if any given cell contains the text.

1.The syntax for this is: = IF(ISTEXT(range), Yes, No)

2. Let’s apply it to one example and see the results

3.The answer, as  we can see from here, is YES, which means the text exists there.

Now you know how to a by using the IF function in Excel.

How to check if a cell contains a text by using the IF function in Excel: Method

In order to check if a cell contains text in Excel, you can use the IF function and the ISBLANK function together.

The IF function is often used to test for certain conditions, such as whether a cell is equal to a specific value or whether it contains data from another cell. However, it can also be used to test if a cell has text in it.

1.The ISBLANK function returns TRUE if the cell is empty and FALSE otherwise. By combining these two functions, you can check if a cell contains a text by using the following syntax:

=IF(ISBLANK(range), No Data, Data)

2. Now, let’s apply it to our example.

3. Since data exists so, it has returned us Data as an answer.

How to check if a cell contains a text by using the IF function in Excel: Method 3

if you want to check whether a cell contains text AND numbers then, In that case, you'll need to use two functions: IF and ISNUMBER. Here's how:

=IF(ISNUMBER(range),TRUE,Not a number)’

Now you know how to check if a cell contains a text by using the IF function in Excel by combining it with the ISNUMBER function.

Did you learn how to check if a cell contains a text using the IF function in Excel? You can follow WPS academy to learn more features of Word documents, Excel Spreadsheets, and PowerPoint slides.