While working in Excel, sometimes we need to find exact and partial matches of a text. We can use the combination of the **IF** & **OR** functions to do this in Excel. In this article, we will discuss **three **practical examples of using the **IF & OR functions with text in Excel**. So, let’s start this article, and explore these examples.

**Table of Contents**hide

## Download Practice Workbook

## 3 Practical Examples of Using IF & OR Functions with Text in Excel

In this section of the article, we will discuss **three **practical examples of using the IF & OR functions with text in Excel. Let’s say, we have the** Work Schedule of ABC Company** as our dataset. Our goal is to use the combination of the **IF **& **OR **functions together with text.

Not to mention, we used the Microsoft Excel 365 version for this article; however, you can use any version according to your preference.

### 1. Combining Text Using IF & OR Functions in Excel

In the first example, we will combine texts using the **IF **& **OR **functions in Excel. Let’s say, we want to know whether a **Day **is a “**Working Day**” or it’s a “**Weekend**“. Here, if the day is **Saturday **or **Sunday**, we will show “**The Day is Weekend**” in cell **D5**. Otherwise, it will show, “**The Day is Working Day**“. Now, let’s follow the instructions mentioned below.

__Steps:__

- Firstly, use the following formula in cell
**D5**.

`="The Day is "&IF(OR(C5="Saturday",C5="Sunday"),"Weekend","Working Day")`

**Formula Breakdown **

- Here, in the
**OR**function,**C5=”Saturday”**→ It is theargument.*logical1***C5=”Sunday”**→ This refers to theaugment.*[logical2]***Output**→**FALSE**.

- Now, the
**IF**function becomes →**=IF(FALSE,”Weekend”,”Working Day”)**.- Here,
**FALSE**→ This is theargument.*logical_test* **“Weekend”**→ It refers to theargument.*[value_if_true]***“Working Day”**→ This indicates theargument.*[value_if_false]***Output**→**“Working Day”**.

- Here,
- Finally, two text strings are combined together by an And Operator (&).
**Output**→**The Day is Working Day**.

- Then, hit
**ENTER**.

As a result, you will have the following output in cell **D5**.

- Finally, use Excel’s
**AutoFill**feature to get the rest of the outputs as demonstrated in the image below.

### 2. Using IF & OR Functions with Text Having Exact Match

In the second example, we will use the **IF **& **OR **functions with texts that have **exact matches**. Here, we will use the same dataset that we used in the first example. For instance, let’s say, we want to show the **Working Hours** for every day. But if the day is **Saturday **or **Sunday**, then we will show “**Weekend**“. Now, let’s follow the steps mentioned below to do this.

__Steps:__

- Firstly, use the following formula in cell
**D5**.

`=IF(OR(C5="Saturday",C5="Sunday"),"Weekend","9:00AM - 5:00PM")`

Here, cell **C5 **represents the first cell of the **Day **column.

**Formula Breakdown **

- Here, in the
**OR**function,**C5=”Saturday”**→ It is theargument.*logical1***C5=”Sunday”**→ This refers to theaugment.*[logical2]***Output**→**FALSE**.

- Now, the
**IF**function becomes →**=IF(FALSE,”Weekend”,”9:00AM – 5:00PM”)**.- Here,
**FALSE**→ This is theargument.*logical_test* **“Weekend”**→ It refers to theargument.*[value_if_true]***“9:00AM – 5:00PM”**→ This indicates theargument.*[value_if_false]***Output**→**9:00AM – 5:00PM**.

- Here,

- After that, press
**ENTER**.

Consequently, you will have the **Working Hour **for **Thursday **in cell **D5**.

- Finally, use Excel’s
**AutoFill**feature to get the**Working Hours**for the rest of the**Days**.

Here, you can see that for **Saturday **and **Sunday**, “**Weekend**” is displayed in the **Working Hour **column, as demonstrated in the following picture.

### 3. Applying IF & OR Functions with Text Having Partial Match

In the previous example, we dealt with exact matches. But in this example, we will use the **IF **& **OR **functions with texts that have a **partial match**. Here, we will use **wildcards** to specify partial matches. Let’s say, we have the **Laptop Prices in Micro Center Store** as our dataset. We will check the **Availability **of the laptops in the inventory. Let’s say, all the **Asus **and **Lenovo **laptops are out of stock and the other laptops are in stock at this moment. So, we will display “**Out of Stock**” for **Asus **and **Lenovo **laptops and “**In Stock**” for the remaining laptops. Now, let’s use the instructions outlined below to do this.

__Steps:__

- Firstly, apply the following formula in cell
**E5**.

`=IF(OR(COUNTIF(B5,"Asus"&"*"),COUNTIF(B5,"Lenovo"&"*")),"Out of Stock","In Stock")`

Here, cell **B5 **indicates the first cell of the **Laptop **column.

**Formula Breakdown **

- In the first
**COUNTIF function**,**B5**→ It refers to theargument.*range***“Asus”&”*”**→ It is theargument.*criteria***Output**→**1**.

- In the second
**COINTIF**function,**B5**→ This indicates theaugment.*range***“Lenovo”&”*”**→ It is theargument.*criteria***Output**→**0**.

- Now, the
**OR**function becomes,**OR(COUNTIF(B5,”Asus”&”*”),COUNTIF(B5,”Lenovo”&”*”))**→**OR(1,0)**.**Output**→**TRUE**.

- Then, the
**IF**function becomes,**=IF(OR(COUNTIF(B5,”Asus”&”*”),COUNTIF(B5,”Lenovo”&”*”)),”Out of Stock”,”In Stock”)**→**=IF(TRUE,”Out of Stock”,”In Stock”)**.- Here,
**TRUE**→ This is theargument.*logical_test* **“Out of Stock”**→ It represents theargument.*[value_if_true]***“In Stock”**→ This is theargument.*[value_if_false]***Output**→**Out of Stock**.

- Here,

- Following that, press
**ENTER**.

Consequently, you will see that the **Asus ZenBook UX430UN **laptop has gone **Out of Stock**.

- Lastly, apply Excel’s
**AutoFill**option to get the**Availability**for the remaining**Laptops**.

## Practice Section

In the **Excel Workbook**, we have provided a **Practice Section **on the right side of the worksheet. Please practice it yourself.

## Conclusion

So, these are the most common and effective methods you can use anytime while working with your Excel datasheet to** use the IF & OR functions with text** **in Excel**. If you have any questions, suggestions, or feedback related to this article, you can comment below. You can also have a look at our other useful articles on Excel functions and formulas on our website, **ExcelDemy**, a one-stop Excel solution provider.