Hello and welcome to our new video, in this video we will
learn about if condition, for example if someone's age is
above 18 years then he is eligible for voting and she is
eligible for voting
if someone's age is below 18 years then they are not
eligible for voting
so how can we use this condition in excel?
I have some data, I have to filter out something from that
data
so how can we do that?
we can do that with the help of if condition
so let's see how this condition works, first of all I will
open excel
here I have some data, what is the data?
here some names are written and age is written
and here I can see some symbols
and what I have to find out in this?
I have to find out that if someone's age is below 18 years
then it should be printed as minor
and if someone's age is above 18 years then it should be
printed as adult
we are going to do this with the help of if condition
so first of all I will tell you what are these symbols
after that you will understand better that how to use if
condition
so first of all we will talk about
that you have any two values, any two numbers
suppose it is 18 and 25
if I put 18 in this cell
I will increase its size
ok
if I put 18 in this cell and 25 in this cell
ok
and if I ask you that which one is bigger
which one is greater
so you will say 25 is greater
but how do we show this in condition?
so I am showing you the same thing
this symbol you can see
this symbol is called greater than symbol
this symbol is called less than symbol
and this symbol is called equals to symbol
if we reverse this equals to symbol
then this is called not equals to
this is called less than equals to
and this is called greater than equals to
now I will show you on values
so if you have to show from 18 and 25
are these values equal?
ok
so what you will say
these values are not equal
so which symbol we will use?
we will use this symbol
of not equals
ok
not equals is not written like this
it is written by noting
I will show you how it is written
but this is how symbol is represented
it is written like this
not equals to
we write this
if I have to show that two things are not equal
so first of all we start from here
if I have to show that two things are equal
so how I will show
like 18 and 25 are not equal
ok
so what I will write here
if I have to represent
so I will write 18 not equals to 25
this is how things are shown
ok
I will highlight this
if I have to show that two values are equal
I will write 25 equals to 25
ok
so I am using symbol of equals
ok
this symbol of equals
ok
here
it is written like this
it is written two times
what is the meaning of writing two times?
writing two times means
it compares values
it compares first value with second value
and tells that
are these values equal or not
apart from this
this symbol of greater than
if I have to show that 25 is greater than 18
so I will write 25 greater than 18
this symbol is available on your keyboard
ok
so I will show like this in condition
if 25 is greater than 18
so it will be like this
or I have to show less than condition
if I have to use this symbol
so I will show
18 less than 25
so see
symbol is different
here it is greater than
here it is less than
ok
here if I have to show
greater than equals to
ok
then how it will work
ok
if I write here
25 greater than equals to
25
ok
what is the meaning of this?
it means
it will be clear
when I will put condition
it will confuse you
for now
leave it
ok
I will show you
greater than
and less than
I will show you both
greater than equals to
and less than equals to
I think
all these will be clear to you
ok
now here
what I have to do
from this data
I have to put condition of if
I have to put formula of if
and I want
that
above 18
it should be written
adult
below 18
it should be written minor
so how I will use
we know
that
in excel
any formula
when we use
so first of all
we have to put sign of equals to
ok
so what we will do
in this way
we will put sign of equals to
and here
we will write if
as soon as I wrote if
it suggested me
that here is if
ok
you double click on it
here it will show
logical test
ok
after that
values if true
values if false
now how to do this
I have to
in previous cell
we know that
in previous cell
you have to put formula
after that
drag it down
so
on every cell
same formula will be applied
so we are going to do
same thing
like
I have seen
cell name
this is J2
so I have written
if J2
if
less than
ok
how many
less than
18
less than
ok
so what should be
here
I have put
here I have put
condition
that J2
if it is less than
18
so what should be
printed
what should be
shown on screen
on screen
should be shown
minor
now I write this text
I will write it
in double quote
like double column
double quote
is written above
ok
so here
I will write
ok
and
I have closed it
after this
I have put
one more comma
so if
J2 is less than
18
if J2 is less than
18
then minor will be written
if it is above 18
then what will be written
then adult will be written
adult because
there is a text
there is a name
so I will write it
in double quote
ok
here I have written
adult
and I have closed it
and I have closed
bracket also
ok
you have to write this much
what you have to do
you have to write
if
if means
if
if it is like this
then it should be like this
if it is not like this
then it should be like this
so here I am trying to
do the same thing
if
J2
now what is J2
it is 25
it is 25 value
is 25
less than 18
you will say
no
so here
what should be printed
adult should be printed
ok
after writing this much
let's enter it
that adult is written
so I have
entered
see adult is written
after this
what I have done
I have dragged it from here
and now see
28
mine is bigger than 18
ok
so adult should be written
adult is written
30
adult
15
less than
18
that's why
what is written
minor is written
clear
ok
below 23
adult is written
14
minor is written
ok
I think you will be clear
I will show you this one
that
less than equals to
I will show you
ok
all this
what I do
delete from here
and then
again
put a formula
equals to
if
J2
less than
equals to
18
means
any value
if I get
in any cell
like this
which is
equal to
18
ok
then also
show minor
ok
then also
show minor
like here
there is no value
no
there is no value
I will write the value
ok
so what I did
J2
less than
equals to 18
so what it shows
to me
it shows
minor
ok
and
otherwise
it shows
adult
so I wrote
this thing
here
and then
closed it
and entered
adult
here
any value
ok
now 18
I did it
we become adult
on 18
but because
what I put
sign of
less than
equals to
ok
to explain
in this way
you can also put
sign of
greater than
equals to
now I wrote
18 here
now here
adult
will not be written
what will be written
here
minor
will be written
ok
let's check it
ok
I think
it will be clear
ok
in this way
if you have
any data
from that data
you have to
print something
that
less than
equals to
this
ok
so
I will
print
this
ok
so
I will
print
this
ok
so
I will
print
this or you can say in case of voting if it is below 18
then you can say it is not eligible, if it is above 18 then
you can say it is eligible so if you want to print this
kind of thing from many data then you can use if condition
I think it will be clear to you
if there is any doubt then you can play this video again