What is the use of AND function?

AND Function in Excel tests two or more conditions to see if they are all true.It returns TRUE if all conditions are TRUE, returns FALSE if any of the conditions is FALSE. AND function would be used in conjunction with another function such as IF function.

PREMIUM TEMPLATES LIMITED TIME OFFER

ON SALE80% OFF

BROWSE ALL TEMPLATES

50+ Project Management Templates Pack
Excel PowerPoint Word

VIEW DETAILS

Advanced Project Plan & Portfolio Template
Excel Template

VIEW DETAILS

Ultimate Project Management Template
Excel Template

VIEW DETAILS

20+ Excel Project Management Pack
Excel Templates

VIEW DETAILS

20+ PowerPoint Project Management Pack
PowerPoint Templates

VIEW DETAILS

10+ MS Word Project Management Pack
Word Templates

VIEW DETAILS


What is the syntax of AND function?

AND Function in Excel- Syntax

AND(condition1,condition2,..)

AND Function in Excel – Examples

AND Function in Excel- Example 1

Example 1: Returns TRUE as both conditions are satisfying
Example 2: Returns False asthe second condition is not satisfying
Example 3: Returns FALSE as both conditions are not satisfying
Example 4: Returns TRUE as both conditions are satisfying
Example 5: Returns TRUE as all 3 conditions are satisfying

Example on AND function in conjunction with IF Function

AND Function in Excel- Example 2

Example 6: AND Returns TRUE as both conditions are satisfying, IF retuns ‘Correct’ as the condition is TRUE
Example 7: AND Returns FALSE as the second condition is not satisfying, IF retuns ‘Not Correct’ as the condition is FALSE

VBA example on AND function

AND function is also available in VBA, following is the example code:

Dim sOutout As String
Dim iVal1 As Integer
Dim iVal2 As Integer
iVal1 =2100
iVal1 =3500

If iVal1 > 2000 AND iVal2 >= 3000 then
sOutout=”Correct”
Else
sOutout=”Incorrect”
End If

Output: as both the conditons are TRUE value of sOutout will be “Correct”

Reference:

Please refer the below article for more Logical Excel functions.
Logical Excel Formulas

Please refer the below article for more Excel Functions.
Excel Formulas | Home

LIMITED TIME OFFER - Get it Now!
Advanced Project Plan Excel Template

 
Related Resource External VBA Reference