logical function =if(condition,"true statment","false statment")
=if(condition ,formula1,formual2
simple if
product price categories formula
apple 24 low =IF(B6>100,"high","low")
mango 344 high =IF(B7>100,"high","low")
orange 45 low
grapes 99 low =IF(B9>100,"high","low")
pineapple 331 high =IF(B10>100,"high","low")
waremelon 67 low =IF(B11>100,"high","low")
guava 221 high =IF(B12>100,"high","low")
name marks result formula
deepa 24 fail =IF(B16>=35,"pass","fail")
priya 24 fail
uma 55 pass
anu 3 fail
anil 44 pass
=if(and())to check multiple condition
all the condiiton must be true , to display true statment,
if one of the condition is false it takes false statment
example for if(and) =if(And(cond1,cond2,cond3),"true","false")
names eng mat comp result formula
deepa 56 34 88 pass =IF(AND(B25>35,C25<3
anu 77 35 55 fail =IF(AND(B26>35,C26<3
reena 88 55 88 fail =IF(AND(B27>35,C27<3
geeta 23 100 100 fail =IF(AND(B28>35,C28<3
example for if (or) =if(or(con1,cond2,cond3),"True","false")
any one condition is true it takes true statement.
if all the conditions are false it takes false statement
names internal1 internal2 internal3 result fromula
deepa 7 30 6 pass =IF(OR(B35<25,C35<25,
roopa 77 1 3 pass =IF(OR(B36<25,C36<25,
anu 55 33 55 pass =IF(OR(B37<25,C37<25,
keerthi 2 4 5 pass =IF(OR(B38<25,C38<25,
example 2 for if(and)
names Adhaar card Pan card Voter Card passport status formula
deepa yes yes yes eligible =IF(AND(B43="yes",C43
roopa yes no yes not eligible =IF(AND(B44="yes",C44
anu no no no not eligible =IF(AND(B45="yes",C45
keerthi yes no yes not eligible =IF(AND(B46="yes",C46
leela yes yes yes eligible =IF(AND(B47="yes",C47
example for if or
names Adhar card Pan card Voter Card passport status formula
deepa yes yes yes ELIGIBLE =IF(OR(B52="YES",C52=
roopa yes no yes ELIGIBLE =IF(OR(B53="YES",C53=
anu no no no NOTELIGIBLE =IF(OR(B54="YES",C54=
keerthi no no yes ELIGIBLE =IF(OR(B55="YES",C55=
leela yes yes yes ELIGIBLE =IF(OR(B56="YES",C56=
>90,A
example for nested if(IFS): for single cell to apply multiple condition >80,B,
>60>C,>50>D<50<E
names avg grade formula
deepa 56.34 D 0 =IF(B61>=80,"B",IF(B61>=60,"C",IF(B61<4
reena 90.53 A
teena 77.32 C
keerthi 87.22 B
leela 21.32 E
hema 66.1 C
if(not): if condition is not true, it executes true statement =if(not(condition),"false","true")
AGE vote formula
14 TRUE =IF(NOT(A71>15),"TRUE","FALSE")
55 FALSE =IF(NOT(A72>15),"TRUE","FALSE")
66 FALSE =IF(NOT(A73>15),"TRUE","FALSE")
43 FALSE =IF(NOT(A74>15),"TRUE","FALSE")
12 TRUE =IF(NOT(A75>15),"TRUE","FALSE")
t")
=IF(AND(B25>35,C25<35,D25>35),"pass","fail")
=IF(AND(B26>35,C26<35,D26>35),"pass","fail")
=IF(AND(B27>35,C27<35,D27>35),"pass","fail")
=IF(AND(B28>35,C28<35,D28>35),"pass","fail")
=IF(OR(B35<25,C35<25,D35>25),"pass","fail")
=IF(OR(B36<25,C36<25,D36>25),"pass","fail")
=IF(OR(B37<25,C37<25,D37>25),"pass","fail")
=IF(OR(B38<25,C38<25,D38>25),"pass","fail")
=IF(AND(B43="yes",C43="yes",D43="yes"),"eligible","not eligible")
=IF(AND(B44="yes",C44="yes",D44="yes"),"eligible","not eligible")
=IF(AND(B45="yes",C45="yes",D45="yes"),"eligible","not eligible")
=IF(AND(B46="yes",C46="yes",D46="yes"),"eligible","not eligible")
=IF(AND(B47="yes",C47="yes",D47="yes"),"eligible","not eligible")
=IF(OR(B52="YES",C52="YES",D52="YES"),"ELIGIBLE","NOTELIGIBLE")
=IF(OR(B53="YES",C53="YES",D53="YES"),"ELIGIBLE","NOTELIGIBLE")
=IF(OR(B54="YES",C54="YES",D54="YES"),"ELIGIBLE","NOTELIGIBLE")
=IF(OR(B55="YES",C55="YES",D55="YES"),"ELIGIBLE","NOTELIGIBLE")
=IF(OR(B56="YES",C56="YES",D56="YES"),"ELIGIBLE","NOTELIGIBLE")
IF(B61>=60,"C",IF(B61<40,"D")))
on),"false","true")