IF Function

how to use if function in excel


IF Function is well known conditional function. IF function used with other logical functions also.

IF function compares two values or functions and returns conditional true value or false value.


=If(Condition, Condition is true, Condition is False)
=If(A>B, TRUE, FALSE)

Here we have created a function for testing
  • If A is greater than B then IF function will return TRUE
  • If A is not greater than B then IF function will return FALSE

Syntax

=If(Logical Test, [If logical Test True],[If Logical Test False])

Arguments

Logical Test: A value or a condition which we want to evaluate
If Logical True: If logical Test is true then this value is return
If Logical False: If logical test is false then this value is return

Behavior



Here we have taken an example in which month names and its figures are shown

We have applied IF function for the condition that, figures are more than 60 then it will return PROFIT and figures are less than 60 then it will return LOSS.

Here JANUARY is less than 60 then the function returns LOSS
And FEBRUARY is greater than 60 then the function returns PROFIT.


Usage

IF function is used for specific conditional testing of the data.


Returns

IF function returns two results,
The first result if the condition is true or 
The second result if the condition is false.







No comments:

Post a Comment