“OR”
Used for – “OR” function in MS Excel is used to check that is any one of the logical test/condition
is true out of given set of logical test / conditions. This results in TRUE
or FALSE which can be used as a condition for further decision.
Syntax – OR(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
|
=OR(C2>3000,D2<1250)
|
=OR(C2<3000,D2>1250)
|
|
3
|
New Delhi
|
Banana
|
2000
|
1250
|
=OR(C3>3000,D3<1250)
|
=OR(C3<2000,D3>1250)
|
|
4
|
Muktsar
|
Papaya
|
3000
|
1000
|
=OR(C4>3000,D4<1250)
|
=OR(C4<2000,D4>1250)
|
|
5
|
Muktsar
|
Orange
|
4000
|
750
|
=OR(C5>3000,D5<1250)
|
=OR(C5<2000,D5>1250)
|
|
6
|
Chandigarh
|
Banana
|
5000
|
500
|
=OR(C6>3000,D6<1250)
|
=OR(C6<2000,D6>1250)
|
|
7
|
Chandigarh
|
Papaya
|
6000
|
250
|
=OR(C7>3000,D7<1250)
|
=OR(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
|
TRUE
|
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 OR: -
- All the logical provided in the function OR must end with TRUE or FALSE.
- Any logical which end up with empty or blank or any thing 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.
- "OR" can be used in array form. For doing this type the formula and press CTRL+SHIFT+ENTER.
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.