Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Using-Functions

The document explains the use of IF, AND, and OR functions in Excel for performing conditional logic and automating calculations. It details the syntax and application of these functions, including nested IF functions and combinations of IF with AND and OR for complex decision-making. Examples illustrate how to implement these functions to evaluate conditions and return specific results based on the criteria set.

Uploaded by

ulitajoshua323
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Using-Functions

The document explains the use of IF, AND, and OR functions in Excel for performing conditional logic and automating calculations. It details the syntax and application of these functions, including nested IF functions and combinations of IF with AND and OR for complex decision-making. Examples illustrate how to implement these functions to evaluate conditions and return specific results based on the criteria set.

Uploaded by

ulitajoshua323
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Using Functions

in Excel
IF, AND, and OR
FUNCTIONS
Functions are pre-built formulas that perform
specific calculations or actions on data in your
spreadsheet. They automate complex
processes and save you time and effort.
IF FUNCTIONS
The IF function is the cornerstone of conditional logic in Excel. It
evaluates a condition and returns one value if true and another if
false. This function is essential for creating dynamic spreadsheets
and automating calculations based on specific criteria.

SYNTAX= IF(LOGICAL_TEST, [VALUE_IF_TRUE], [VALUE_IF_FALSE]

Example IF function, step by step:

•Select the cell


•Type =IF
•Double click the IF command
•Specify the condition such as less than, greater than
•Type ,
•Specify the value for when the condition is TRUE
•Type ,
•Specify the value for when the condition is FALSE
•Hit enter
NESTED IF FUNCTIONS
A nested IF function in Excel is a formula that
contains one or more IF functions inside of another.
This allows you to test multiple criteria and increase
the number of possible outcomes

To use the nested IF function in Excel, you can:

•Click IF to open the Function arguments dialog box


•Enter a function into the argument box to nest it
•Enter any additional arguments needed to
complete the formula
•Click OK
•Click the cell where you want to enter the formula
AND FUNCTION
The AND function allows you to test multiple conditions simultaneously. When
combined with the IF function, it enhances your decision-making capabilities. If all
conditions are true, the AND function returns true; otherwise, it returns false,
enabling complex logic.

The AND function is a premade function in Excel, which returns TRUE or FALSE
based on two or more conditions.

It is typed =AND and takes two or more conditions.

Note: The AND function is often used together with the IF function.
=AND([logical1], [logical2], ...)
The conditions are referred to as [logical1], [logical2], and so on.

The conditions can check things like:

If a number is greater than another number >


If a number is smaller than another number <
If a number or text is equal to something =
USING THE OR FUNCTION
Similar to the AND function, the OR function tests multiple conditions but
returns true if at least one condition is true. This function is useful for
creating flexible formulas that can accommodate various scenarios in your
data analysis.

Here's how to use the OR function in Excel:


Click on the cell where you want the "TRUE" or "FALSE" value to appear.
Type "=OR" and press "Enter".
Add logical tests as arguments, separating each condition with a comma.
Add a closing parenthesis after the final condition.
Press "Enter"
COMBINING IF and AND
•IF Function – To test a condition and return a specific value if
that condition is true or another specific value if that condition is
false.
•AND Function – To test multiple conditions. If all the conditions
are true then it will return true and if any of the conditions are
false then it will return false.

If a student is passed both of the subjects with 40 marks or


above, the status should be “Pass”. And, if a student has less
than 40 marks in both of the subjects or even in one subject,
the status should be “Fail”. The formula will be.

=IF(AND(B2>=40,C2>=40),"Pass","Fail")
COMBINING IF and OR
IF OR statement in Excel
To evaluate two or more conditions and return one result if any of the
conditions is TRUE, and another result if all the conditions are FALSE,
embed the OR function in the logical test of IF:
IF(OR(condition1, condition2,...), value_if_true, value_if_false)

Formula Description
=OR(A2>1,A2<100) Displays TRUE if A2 is greater than 1 OR less than 100,
otherwise it displays FALSE.
=IF(OR(A2>1,A2<100),A3,"The value is out of range") Displays the value in cell A3 if it is greater than 1 OR less
than 100, otherwise it displays the message "The value is
out of range".
=IF(OR(A2<0,A2>50),A2,"The value is out of range") Displays the value in cell A2 if it’s less than 0 OR greater
than 50, otherwise it displays a message.
COMBINING IF, AND, AND OR
You can create powerful formulas by combining the IF. AND, and OR functions. This allows for
sophisticated logic in your spreadsheets, enabling you to handle complex decision- making processes
and perform advanced data analysis effectively.

You might also like