Tutorial

# How to use If Cell Contains – 9 Most use Excel If Contains

In Microsoft Office Excel, we use different formulas to get different solutions properly. If cell formula is one of the most popular ways to use data analysis and logical results. Excel cells have particular values, including text, date, number, etc. Whenever the If cell contains value, you will get output according to the formula condition. In the following article, we will dive into discusses how to use “If cell contains” formulas in Excel.

## What Is If Cell Contain

On Microsoft Excel, If celll contains any value then you return a value. That means if you input a value on a cell, you will get the return value by the if cell contains formula. You can analyze any of the cell’s data at the same time value by the formula. The If function is mainly used for analytical and logical testing of a formula.

## Overview of If Function

Around many essential formulas If formula is one of the most used and popular functions. If function is used to make logical comparisons between value and output data. The procedure mainly provides two results: the first result is true and the second is false.

## If Function Syntax

If function works for logical tests when you input a value. The output result depends if a value is true or false. The Syntex of the If function looks like the formula: =If(logical_test, value_if_true, [value_if_false]). The logical term must be input in the first bracket, and the true and false terms must be input in the third bracket.

The generic function of If syntax looks like =IF(logical_test, [value_if_true], [value_if_false]). You can test several conditions with the use of AND and OR.

## How Does IF Formula Look Like

If formula arguments work with the logical test. You will get two output results. The formula results in a value if true or false.

## If Cell Contain Excel Formula

Using the if cells function, you can get output data according to the value input in cells. In Excel, you use a lot of formulas to get the result. Let’s see what the formulas are:

1. You will get a result when If cell contains any value
2. You will get a result when If cell contains text/date/number
3. You will get a result when If cell contains specific text
4. You will get a result when If cell contains particular text string
5. You will get a result when if cell doesn’t contains any specific text
6. You will get a result when If cell contains several of many text strings
7. You will get a result when If cell contains conditional value And
8. You will get a result when If cell contains conditional value Or
9. You will get a result when If a cell contains a conditional value Not

Now we will show you the syntax of the if cell contains practical results.

### 1. You will get a result when If cell contains any value

Whether you will get output a value at first, ensure there was value on the cells. If function does not work, if the cell is blank, or if you don’t input any value because the output value depends on the input formula.

For example, if you input a function like:

=IF(cell<>””, “10”, “”)

Practical Example:

Go to your excel sheet and select an output cell like C3 and use the formula =IF(A2<>””, “10”, “”)

The output result will also be blank if the input cell is blank. But if you input a value on the input cell, the command will show the value result 10 on the output cell.

### 2. You will get a result when If cell contains text/date/number

Check for text:

If you input a text on cell, you will get a return value in the output cell according to the command. Input the text “Sample” on the A column and apply the formula =IF(ISTEXT(A5), “Done”, “”) on a targeted cell. To check the If formula:

• Go to your excel sheet and add the cell number to the formula with “Sample” text.
• Set a value “Done” on the formula
• Press enter button to see the output value.

Note: If any input cells were blank, you would not get any output.

Check for a number Or Date:

If you input any number or Date on any cell in Excel, you will get the output value according to the If cell contains the command. You can Input the following formula to see the result:

=IF(ISNUMBER(Cell), “ok”, “”)

Practical Example:

• Input a value number 14 on the B2 cell
• Select the cell E2 where you want to get the output
• Write the command =IF(ISNUMBER(E2), “ok”, “”) and press enter button
• The If function works perfectly when you input the value on the cell.
• You can’t get the result where you didn’t input value.

### 3. You will get a result when If cell contains specific text

If you want to find a cell that contains text, you will use the formula. To check the formula practically, use the formula on your excel sheet:

=IF(cell=”text”, value_to_return, “”)

Let’s do practically:

• Select the output cell F2 where you want o get the result.
• Input the text Sample on the A5 cell and input the formula, including the value “correct.”
• So the formula be look like =IF(A5=”Sample”, Correct, “”)
• Press the enter button, and you will get the output result current on the F2 cell
• The F4, F10 & F13 cells don’t have any output because the A4, A10 & A13 don’t have any value.

### 4. You will get a result when If cell contains particular text string

Sometimes you need to find the exact match text on an excel sheet. You can use the formula to find the output result. If you want to do it practically, follow the process;

• First, select cell G2 where you want to get the data.
• Input the formula with the cell number E2 and an input value “ok” with the output value “Found.”
• The formula will look like this: =IF(EXACT(E2,”ok”), “Found”, “”)
• Press the enter button and the command will automatically show you the result.

### 5. You will get a result when if cell doesn’t contains any specific text

Do you need to find a cell that doesn’t contain any specific text, we will guide you using the formula: =IF(cell=”text”, “”, “value_to_return”).

For Example:

• You want to find cell that contains the text “Orginal.”
• Select cell A10 that you won’t get the output result “NO”
• Next, use the formula =IF(A10=”Orginal”, “”, “No”).
• You can see the output result NO on the selected cell.

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

In this case, you need to use the formula to identify the cells with many terms, both numbers and words. You can use this formula to find out your targeted cells: =IF(AND(ISNUMBER(SEARCH(“string1”,cell)), ISNUMBER(SEARCH(“string2″,cell))), value_to_return,””)

Let’s see how this formula work:

• Select an output cell H5 where the command shows the result
• If you want to find out the cell, including the text White & Green, then the formula will look like this: =IF(AND(ISNUMBER(SEARCH(“white”,D5)), ISNUMBER(SEARCH(“green”,D5))), “Yes”,””)

### 7. You will get a result when If a cell contains a conditional value And

Get a result between two conditional values by using And function in the IF formula in excel. You can use the formula – =IF(AND(cell>number,cell<number),”value”,””)

Lets’ do it practically:

• Suppose you get a result “Right” when a cell has a value between 100 and 200. So the formula will look like be =IF(AND(cell>100,cell<200),”Right”,””)
• Go to your excel sheet and select the output cell D2.
• Write the formula with the If function, including the cell number B3 and add the value.
• Press the enter button to get the result. If you correctly input the formula, you will get the output.

### 8. You will get a result when If a cell contains a conditional value Or

If you return a value by depending Get a result between two conditional values, you can use Or condition in the IF formula in excel. You can use the formula – =IF(Or(cell=blue,cell=green),”B1+10″,B1perfect,””)

That means If E1=Black or Violet, then provide the value right; otherwise, give the value ideally.

Let’s do it on Excel Sheet:

• Select the output cell C1 on the spreadsheet.
• Next input the value with the formula =IF(OR(A1=”blue”,A1=”green”),B1+10,B1)
• If the A1 Cell contains blue or green, the output result has to be added plus 10 with the B1 Cell; otherwise, the result shows B1.

### 9. You will get a result when If a cell contains a conditional value Not

8. If you get to return a value by depending on Not condition, you can use a formula like =IF(NOT(cell=”value”),cell+10, Cell)

Example:

• Select an output cell like H1 on your excel sheet.
• Then input the function like this =IF(NOT(A1=”red”),C1+10,C1)
• The output result will be If the A1 Cell does not have the value red, the output result shows plue 10 with the cell C1 value.