×

Excel IF() Function

Excel IF() Function: The IF() function in excel checks whether a condition is true or not and returns one value if the condition is TRUE and another value if it's FALSE.

Syntax

if(Logical_Test, [value_if_true], [value_if_false])

Parameter

Logical_Test (required)- This parameter represents the condition which you want to check (greater than, less than or equal to signs can be used for numbers). When you want to evaluate a condition based on text value, then use double quotes ('') with equal to signs.

value_if_true (optional)- This parameter represents the logical test value, and if it holds the value, then excel will return this value.

value_if_false (optional)- If the logical test does not hold, then excel will return this value.

Category

Logical

Return

The function returns one value if the condition is TRUE and another value if it's FALSE.

Example 1

Objective: Using IF formula to identify if a student has passed an exam or not

Student Name Marks Pass or Fail Formula
Mukta 80 Pass  =IF(B2>=30,"Pass","Fail")
Arvind 60 Pass  =IF(B3>=30,"Pass","Fail")
Jyotsna 29 Fail  =IF(B4>=30,"Pass","Fail")
Amar 11 Fail  =IF(B5>=30,"Pass","Fail")

Example 2

Objective: Using the IF Function, check whether the student has passed or not. If the student has failed in 1 of the 2 subjects, then the student will be considered as Failed.

Student Name Subject 1 Subject 2 Overall Result Formula
Reeta PASS PASS PASS  =IF(AND(B26="PASS",C26="PASS"),"PASS","FAIL")
Sweta PASS FAIL FAIL  =IF(AND(B27="PASS",C27="PASS"),"PASS","FAIL")
Baani FAIL PASS FAIL  =IF(AND(B28="PASS",C28="PASS"),"PASS","FAIL")
Aditya PASS PASS PASS  =IF(AND(B29="PASS",C29="PASS"),"PASS","FAIL")

Related Topics

Excel COUNTA() Function

Excel COUNTA() Function The COUNTA() function counts the number of cells in a range that are not empty. Syntax COUNTA([value1], [value [2], ...) Parameter value1(required)- This parameter represents the first cell in the range. value2, …(optional)- It represents...

1 minute read.

Excel HLOOKUP() Function

Excel HLOOKUP() Function The HLOOKUP() function in excel is used to search a value in the topmost row of a table and then return a corresponding value in the same column for the specified...

2 minutes read.

Nearest Multiple in Excel

In Excel, the values in Multiplication can be round up, down and to nearest Multiplication number using Excel default function. This makes the calculation to be performed in an easier...

3 minutes read.

Excel ROUNDUP() Function

Excel ROUNDUP() Function The ROUNDUP() function in excel returns a number rounded up to the nearest possible value and away from zero. Syntax ROUNDUP(Number, num_digits) Parameter Number(required)- This parameter represents the number which you want to...

1 minute read.

Excel INT() Function

Excel INT() Function The INT() function in excel is used to round a number down to the nearest integer. It removes decimal points from any number value & return rounded down number value in...

1 minute read.

Excel LARGE() Function

The LARGE() function in excel returns the k-th largest value in a data set. Syntax LARGE (Array, kth small number from the list) Parameter Array (required)- This parameter represents the list of numbers from which nth...

1 minute read.

Calculating Age in Excel

Microsoft Excel provides separate functions for various mathematical operations. Nowadays, Microsoft Excel is widely used by large and various organizations. Using formulas one can calculate the statistical functions quickly and...

2 minutes read.

Quarter Dates in Excel

Excel is a combination of numeric values and alphabets. The user's project consists of the date depending upon their accounting and financial analysis. Sometimes there is a need to find...

4 minutes read.

Excel EXACT() Function

The EXACT() function in excel checks whether the specified values (texts, numbers) are exactly the same or not. It returns a Boolean value TRUE if the compared values are same, else it...

1 minute read.

Data Analysis in Excel

Data Analysis in Excel Data analysis is a powerful tool that helps the users to make better decisions by comparing different information. Microsoft Excel extends its credibility to enforce the data analysis tool...

6 minutes read.

Solver in Excel

What is Solver? Microsoft Excel facilitates an add-in programming tool known as Solver that uses operational research techniques to find the optimal solutions for objective problems. This tool operates with a group of...

5 minutes read.

Excel IF() Function

Excel IF() Function: The IF() function in excel checks whether a condition is true or not and returns one value if the condition is TRUE and another value if it's...

2 minutes read.

Averageif Function in Excel

Average If in HTML In Mathematics, Average function is used to find the arithmetic mean of the given data. It is defined as the dividing the sum total of given data...

7 minutes read.

How to make use of the Wildcard in Excel

In this modern world, it is known that the wildcard characters in Microsoft Excel are considered to be the most essential and unrated features of Microsoft Excel. Besides all these,...

8 minutes read.

Absolute Value in Excel

What is Absolute Value in Excel? Microsoft Excel worksheet is a combination of numeric values and alphabets. The numeric value is either a positive value or a negative value. Sometimes the...

5 minutes read.

Histogram in Excel

What is Histogram in Excel? “ A histogram is a graphical tool familiar for summarizing discrete or continuous data, where the data are measured on an interval scale.”  Karl Pearson described this...

5 minutes read.

Excel VALUE() Function

The VALUE() function in excel converts the specific text representing a number (i.e., a number, date, or time format) into a numerical value. Syntax VALUE(Text) Parameter Text(required)- This parameter represents the string that you want...

1 minute read.

Excel TIME() Function

Excel TIME() Function The TIME() function in excel returns the serial number of a particular time. Syntax TIME(HOUR, MINUTE, SECOND) Parameter HOUR (required)- This parameter represents the hour for your time. MINUTE (required)- This parameter represents the...

1 minute read.

Separate Strings in Excel

How to Separate String in Excel Day by day, Microsoft Excel is increasing for business and personal use. It is a combination of numbers and alphabets based on the data provided....

4 minutes read.

Copying formula in Excel

Copy a formula in Excel While working with statistical calculations in Microsoft Excel, the user uses formulas to calculate the mathematical operations. Implementing these formulas manually for each data is a...

3 minutes read.