Knowledge base / Excel
AND in Excel: combined conditions, boundaries and data types
I explain when all criteria hold and why a TRUE result alone does not confirm that the source data are complete.

I use AND to build a condition whose criteria must all hold. Both test scores might need to reach 50, or a value might need to fall between two bounds. The function returns a logical result. If I want a “Pass” label, I pass that result to IF. Keeping the condition separate from the message makes mistakes easier to locate.
Syntax and four combinations
Microsoft documents AND as a test of all its conditions. The first argument is required and later ones are optional. It is available in Microsoft 365 and Excel 2024, 2021, 2019 and 2016, among other listed editions. I use English names and commas; separators depend on regional settings. The Polish name is ORAZ.
=AND(logical1,[logical2],...)
Square brackets and the ellipsis describe the syntax and are not typed into a finished formula. For two ordinary, error-free conditions, the result follows this table:
| First condition | Second condition | AND |
|---|---|---|
| TRUE | TRUE | TRUE |
| TRUE | FALSE | FALSE |
| FALSE | TRUE | FALSE |
| FALSE | FALSE | FALSE |
AND does not mean “at least one”. That rule calls for OR. I do not change the function merely because the example then produces a more convenient result. First state whether criteria must hold together or represent alternatives, then select the expression that matches that rule.
Two scores with an inclusive threshold
For synthetic input, B2 contains a test score and C2 an assignment score. Both are valid numeric values. The exercise requires at least 50 in each part, so the comparison includes the boundary through >=.
=AND(B2>=50,C2>=50)
For 60 and 70, both comparisons are true and AND returns TRUE. For 60 and 40, the second condition is false and the result is FALSE. For 50 and 50, it returns TRUE. Replacing the comparisons with >50 would exclude that boundary pair. These cases explain the rule better than inspecting only two comfortably high scores.
To display a message, I add IF. I use concrete references rather than undefined names such as TestScore. Copying the formula to another row should move both references according to the table’s structure. A named input can be useful, but it must actually exist in the workbook before an example can depend on it.
=IF(AND(B2>=50,C2>=50),"Pass","Fail")
Check numeric type and both bounds
For a score between 0 and 100 inclusive, I can combine a type check with the limits. ISNUMBER does not convert text to numbers. A text value “50” does not become valid numeric input simply because its appearance resembles a number.
=AND(ISNUMBER(A2),A2>=0,A2<=100)
For numeric 50, all criteria hold. Numeric 150 fails the upper bound. This expression does not provide complete treatment of every source error. If A2 contains an Excel error, its comparisons may propagate that error. FALSE meaning a failed criterion and an error result are different situations. When the source can contain both, the workbook needs an explicit handling rule rather than an assumption that every problematic input becomes FALSE.

Dates: include the start and exclude the next month
If A2 contains a valid Excel date, possibly including a time, I can identify November 2026 through an inclusive lower bound and an exclusive upper bound. DATE constructs a date from its year, month and day.
=AND(A2>=DATE(2026,11,1),A2<DATE(2026,12,1))
November 1 satisfies the rule, as does November 30 with an afternoon time. December 1 does not. Using <=DATE(2026,11,30) would set the upper boundary at the start of the final day. The beginning of the following month expresses the intended interval more clearly. This example assumes actual date values, rather than arbitrary text that merely looks like a date.
Text comparisons and ignored cells
For a rule requiring letter case to matter, I use EXACT. Microsoft confirms that it performs a case-sensitive comparison. For example, =EXACT("yes","YES") returns FALSE. AND combines the results supplied by the tests; it does not itself choose how strings are compared. I select the text rule explicitly instead of assuming that every comparison expression has identical behaviour.
A comparison such as A2>0 also differs from supplying an entire reference range to AND. For array and reference arguments, text and empty cells are ignored, as explained in the function documentation. If the task requires complete input, I add dedicated checks. TRUE from a collection of conditions does not prove that all required fields have been populated. The logical rule and source completeness need to be examined separately.
Use the condition in conditional formatting
I can use the condition to highlight whole rows. For A2:C20, I choose a formula-based formatting rule and write it relative to the first selected row. Microsoft documents rules based on logical formula results.
=AND($B2>=50,$C2>=50)
The dollar signs keep columns B and C fixed, while the row number remains relative. Each row is therefore assessed through its own two scores. I inspect the rule’s “Applies to” range and its behaviour at the first and last rows. AND does not apply a colour by itself; the formatting rule does that. The result and its presentation remain separate parts of the workbook.
Exercise: explain the boundaries
Prepare the pairs 50 and 50, 49 and 80, and 80 and 49. Explain which criterion determines each result. Replace one value with text and decide whether type validation is required before classification. For dates, compare November 30 with a time against December 1. State the rule in words in every case. Add IF only after you understand the logical result itself and can explain why each example belongs on its side of the boundary.
Key takeaways
When does AND return TRUE?
For ordinary logical conditions, when all of them are true. One false condition is enough to return FALSE.
Does AND apply cell colours?
No. It returns a logical result that can be used by a separate conditional-formatting rule.
How do I include the final day with a time?
For valid dates, use an inclusive lower and exclusive upper bound, such as November 1 through values earlier than December 1.
AI was used in an automated way while working on this article. If you want to learn how to do it too, check out this project.
