How to Use AND Function with Text in Excel (4 Simple Methods)

While working in Microsoft Excel sometimes we need to use AND function. But when it comes to using AND function with texts, then it might seem difficult to you. Today, in this article, I am sharing with you how to use AND function with text in excel. Stay tuned!


Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


4 Easy Methods to Use AND Function with Text in Excel

In the following, I have shared 4 quick and easy methods to use AND function with text in excel.

Suppose we have a dataset of some Client’s Names, Payment Methods, and Payment Dates. Now we will use AND function with multiple conditions in the dataset.


1. Use AND Function with Text to Test Logical Values

Sometimes you might need to check whether the list of information in your worksheet is filled correctly or not. To check that you can run a logical test. Using the AND function you can quickly test logical values whether the cells contain texts or numeric values. Just follow the steps below-

Steps:

  • First, choose a cell (E5) and write the following formula down-
=AND(C5=$H$8,D5<$H$9)

Where,

  • The AND function will return “True” if the argument (C5=$H$8,D5<$H$9) is matched. If not then it will return “False”.

Use AND Function with Text to Test Logical Values

  • Hit Enter to continue.
  • Next, drag the “fill handle” to fill all the cells with your logical output.

  • In summary, we can say that the logical test is completely run using the AND function for texts.

Use AND Function with Text to Test Logical Values

Read More: How to Return TRUE or FALSE Using Excel AND Function


2. Apply Conditional Formatting by Using AND Function with Text

If you want you can apply conditional formatting by using AND function with text in excel. Follow the steps properly-

Steps:

  • Above all, select cells (B5:B13) where you want to apply the conditional formatting rules.
  • Next, choose “New Rule” from the “Conditional Formatting” feature.

Apply Conditional Formatting by Using AND Function with Text

  • A new dialog box will appear named “New Formatting Rule”.
  • From the new window select “Use a formula to determine which cells to format”.
  • Now, in the “Format values where this formula is true” box put the following formula-
=AND(C5=$G$8,D5<$G$9)
  • Thereafter, click “Format” to choose your desired color to fill.

Apply Conditional Formatting by Using AND Function with Text

  • Then, go to the “Fill” option and select a desired color from the list, and press OK.

  • In conclusion, you will desire color for the cells using the AND function. Simple isn’t it?

Apply Conditional Formatting by Using AND Function with Text


3. Combine OR and AND Functions with Text in Excel

While performing AND function containing texts, you can add multiple conditions with the OR and AND functions. To do so-

Steps:

  • Simply, select a cell (E5) and put the formula down-
=OR(AND(C5=$H$8,D5<$H$9),AND(C5=$H$8,D5<$H$9))

  • Similarly, press Enter and drag down the “fill handle” to fill all the cells.
  • In summary, we will get the output using the AND function with text values in excel.

Combine OR and AND Functions with Text in Excel


4. Merge IF and AND Functions with Text in Excel

Sometimes you might need to extract the output from the list instead of the “True” and “False” output. For that,

Steps:

  • In the same fashion, choose a cell (E5) and apply the following formula down-
=IF(AND(C5=$H$8,D5<$H$9),B5,"")

Merge IF and AND Functions with Text in Excel

  • Just hit the Enter button and drag the “fill handle” down.
  • Within seconds, you will get the output in a new column by using the AND function for text values in excel.

How to Use AND Function with Text in Excel

Read More: How to Use IF with AND Function in Excel (Formula + VBA)


Things to Remember

  • The AND function in excel will provide an output “True” if all the conditions in the arguments are true. If any of the conditions is false it will return “False” as the output.

Conclusion

In this article, I have tried to cover all the examples to use AND function with text in excel. Take a tour of the practice workbook and download the file to practice by yourself. I hope you find it helpful. Please inform us in the comment section about your experience. We, the ExcelDemy team, are always responsive to your queries. Stay tuned and keep learning.


Related Articles

Wasim Akram

Wasim Akram

Hi! my name is Wasim Akram. I am a graduate in mechanical engineering from Ahsanullah University of Science & Technology. I am passionate about learning new things and writing articles. I write article about Microsoft Excel and it's my favourite thing to do.

We will be happy to hear your thoughts

Leave a reply

5 Excel Hacks You Never Knew

Genius tips to help you unlock Excel's hidden features

FREE EMAIL BONUS

ExcelDemy
Logo