AND

No Comments

“AND”

Used for – “AND” function in MS Excel is used to check that all of the logical test/condition specified are true. This results in TRUE or FALSE which can be used as a condition for further decision.

Syntax – AND(logical1, [logical2], …)

             logical1 – It is any formula/logical test/condition or a reference cell containing result of any logical test in true or false. It is a compulsory field and if you did not fill any value excel will not proceed further.
            [logical2] – This is an optional field it also contains the logical test likewise logical1.
           
Example – Following example will clear the OR function: -

In below table column A, B, & C contains some sales data for particular item in specified cities. Now column G & H contains the OR function with different criteria.

A
B
C
D
E
F
G
1
City
ITEM
Sale
Qty.



2
New Delhi
Orange
1000
1500

=AND(C2>3000,D2<1250)
=AND(C2<3000,D2>1250)
3
New Delhi
Banana
2000
1250

=AND(C3>3000,D3<1250)
=AND(C3<2000,D3>1250)
4
Muktsar
Papaya
3000
1000

=AND(C4>3000,D4<1250)
=AND(C4<2000,D4>1250)
5
Muktsar
Orange
4000
750

=AND(C5>3000,D5<1250)
=AND(C5<2000,D5>1250)
6
Chandigarh
Banana
5000
500

=AND(C6>3000,D6<1250)
=AND(C6<2000,D6>1250)
7
Chandigarh
Papaya
6000
250

=AND(C7>3000,D7<1250)
=AND(C7<2000,D7>1250)

And result you get as under: -

A
B
C
D
E
F
G
1
City
ITEM
Sale
Qty.



2
New Delhi
Orange
1000
1500

FALSE
TRUE
3
New Delhi
Banana
2000
1250

FALSE
FALSE
4
Muktsar
Papaya
3000
1000

FALSE
FALSE
5
Muktsar
Orange
4000
750

TRUE
FALSE
6
Chandigarh
Banana
5000
500

TRUE
FALSE
7
Chandigarh
Papaya
6000
250

TRUE
FALSE

Now you can use this result as input for any formula and get result when anyone of the condition is satisfy your specified criteria.
NOTE: - Please do care of following points when you use AND: -
  • All the logical provided in the function OR must end with TRUE or FALSE.
  • Any logical which end up with empty or blank or anything other than TRUE or FALSE will get ignored.
  • If there is no logical ends up with TRUE / FALSE then function will return the #VALUE! error.
  • You can enter up to 255 logical at max.

Dear readers, after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me. Thank you.