Table of Contents
- INTRODUCTION
- PURPOSE OF AND FUNCTION IN GOOGLE SHEETS
- PREREQUISITES TO LEARN AND
- SYNTAX: AND FUNCTION IN GOOGLE SHEETS
- EXAMPLE: AND FUNCTION IN GOOGLE SHEETS
- KNOWLEDGE BYTES
INTRODUCTION
Life is full of logical conditions. We wake up and we have two choices. Get out of the bed or again go to sleep.
Same is the case with our applications or programs in GOOGLE SHEETS which we create. Every decision is full of conditions which need to to fulfilled before the final execution.
But there are different types of conditions. Some are necessary and some are optional. So this article will be focusing on the conditions which are necessary i.e. have to be met at any cost for the execution of the program.
We are discussing about the AND FUNCTION in GOOGLE SHEETS.
AND function comes under the LOGICAL FUNCTIONS category in GOOGLE SHEETS.
AND function is very important and is going to be used a lot because of which it has become one of the very important functions in GOOGLE SHEETS .
It simply behaves like the binary AND. [A separate section covers the information at the end of the article]
It checks if all the conditions are TRUE OR NOT.
IT returns TRUE if ALL THE CONDITIONS ARE TRUE and false , if any of the conditions is FALSE.
This article will discuss the purpose , syntax, use and examples of AND FUNCTION in GOOGLE SHEETS .
PURPOSE OF AND FUNCTION IN GOOGLE SHEETS
AND FUNCTION RETURNS TRUE IF ALL THE CONDITIONS ARE TRUE AND FALSE IF ANY OF THE GIVEN CONDITIONS IS FALSE.
If we try to analyze this function by its name “AND”, we can understand the meaning in a better way.
AND itself means together. For example, I and my friend went somewhere. It means we both went. Both conditions are true.
Similarly AND function will be true, if all conditions being tested are true.
PREREQUISITES TO LEARN AND
THERE ARE A FEW PREREQUISITES WHICH WILL ENABLE YOU TO UNDERSTAND THIS FUNCTION IN A BETTER WAY.
- Some information about the BINARY MATHEMATICS is an advantage for the use of such formulas.
- Basic understanding of how to use a formula or function.
- Basic understanding of rows and columns in google sheets.
- Of course, google sheets login and internet.
Helpful links for the prerequisites mentioned above
What Excel does? How to use formula in Excel?
SYNTAX: AND FUNCTION IN GOOGLE SHEETS
The Syntax for the function is
=AND(CONDITION 1, CONDITION 2, CONDITION 3, …… SO ON)
CONDITION1 Any condition (e.g. if any cell>12)
CONDITION2 Any condition (if any cell <45)
At least TWO CONDITIONS are needed. At the most, any number of conditions can be used.
EXAMPLE: AND FUNCTION IN GOOGLE SHEETS
DATA SAMPLE
Suppose we have a cell which contains a number.The objective is to check whether the given number is greater than 12 and less than 45 or not.
STEPS TO USE AND FUNCTION
TWO cases have been discussed.
ONE will result in TRUE and OTHER as FALSE.
The value to be checked is present in the cell H9
We’ll put the formula in I9 as
=AND(H9<45,H9>12)
As 40 satisfies the both conditions, the result is TRUE.
FOR CASE II
The value to be checked is present in the cell H12
We’ll put the formula in I12 as
=AND(H12<45,H12>12)
As 60 satisfies the both conditions, the result is FALSE.
KNOWLEDGE BYTES
BINARY AND
BINARY MATHEMATICS have just two number-0 and 1.
Its just like the DECIMAL SYSTEM which we use in day to day life which has ten numbers 0 to 9.
So AND is known as the BINARY MULTIPLICATION. As we can understand easily that
0x0=0
1×0=0
0x1=0
1×1=1
where 1 is TRUE and 0 is false.
Same goes in this function. When all the conditions are true, only then we get TRUE result.