Home / If statement in excel

If statement in excel

The main syntax for the IF function in Microsoft Excel is:

IF( condition_here, [value_if_true], [value_if_false] )

If A1 equal to B1

=IF(A1=B1, "value_if_true", "value_if_false")

If A1 not equal to B1

=IF(A1<>B1, "value_if_true", "value_if_false")

If A1 greater than B1

=IF(A1>B1, "value_if_true", "value_if_false")

If A1 less than B1

=IF(A1<B1, "value_if_true", "value_if_false")

If A1 Greater than or equal to B1

=IF(A1>=B1, "value_if_true", "value_if_false")

If A1 Less than or equal to B1

=IF(A1<=B1, "value_if_true", "value_if_false")

all rights reserved