0% found this document useful (0 votes)
26 views9 pages

Excel If Function

The document provides an overview of the Excel IF function, which evaluates a condition and returns specified values based on whether the condition is true or false. It outlines the syntax of the function, examples of its usage, and step-by-step instructions for implementing it in Excel. The document emphasizes the importance of correct formatting and the ability to apply the function across multiple rows.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views9 pages

Excel If Function

The document provides an overview of the Excel IF function, which evaluates a condition and returns specified values based on whether the condition is true or false. It outlines the syntax of the function, examples of its usage, and step-by-step instructions for implementing it in Excel. The document emphasizes the importance of correct formatting and the ability to apply the function across multiple rows.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

8/11/25, 11:21 AM Excel IF Function

 Tutorials  Exercises  Services   Sign In

ML  CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++

Excel IF Function
❮ Previous Next ❯

IF Function
The IF function is a premade function in Excel, which returns values based on a true or
false condition.

It is typed =IF and has 3 parts:

=IF(logical_test, [value_if_true], [value_if_false])

The condition is referred to as logical_test , which 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 =

Note: You can decide both the return values and the condition.

https://www.w3schools.com/excel/excel_if.php 1/9
8/11/25, 11:21 AM Excel IF Function

Note: The different parts of the function are separated by a symbol, like comma , or
 Tutorials 
semicolon ;
Exercises  Services   Sign In

ML The
CSSsymbol
JAVASCRIPT SQL Language
depends on your PYTHONSettings.
JAVA PHP HOW TO W3.CSS C C++

Example IF function (equal to)


Check if the Pokemon type is grass:

The condition is if the "Type 1" value for the Pokemon is "Grass".

The function returns "Yes" or "No".

Copy Values

Example IF function, step by step:

1. Select the cell D2


2. Type =IF
3. Double click the IF command

https://www.w3schools.com/excel/excel_if.php 2/9
8/11/25, 11:21 AM Excel IF Function

 Tutorials  Exercises  Services   Sign In

ML  CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++

4. Specify the condition B2="Grass"


5. Type ,
6. Specify the value "Yes" for when the condition is TRUE
7. Type ,
8. Specify the value "No" for when the condition is FALSE
9. Hit enter

Since the value in cell B2 is "Grass", the condition is true and the function will return
"Yes".

Note: Text values needs to be in quotes: " "

The function can be repeated with the filling function for each row to perform the same
check for each Pokemon:

https://www.w3schools.com/excel/excel_if.php 3/9
8/11/25, 11:21 AM Excel IF Function

 Tutorials  Exercises  Services   Sign In

ML  CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++

Now, each row has a check for Grass Type:

Example IF Function (greater than)


Check if the Pokemon's total stats is greater than 500:

The function returns "Yes" or "No".

https://www.w3schools.com/excel/excel_if.php 4/9
8/11/25, 11:21 AM Excel IF Function

 Tutorials  Exercises  Services   Sign In

ML  CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++

Copy Values

Example IF function, step by step:

1. Select the cell D2


2. Type =IF
3. Double click the IF command

4. Specify the condition C2>500


5. Type ,
6. Specify the value "Yes" for when the condition is TRUE
7. Type ,
8. Specify the value "No" for when the condition is FALSE
9. Hit enter

https://www.w3schools.com/excel/excel_if.php 5/9
8/11/25, 11:21 AM Excel IF Function

 Tutorials  Exercises  Services   Sign In

ML  CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++

Since the value in cell C2 is 318, the condition is false and the function will return "No".

The function can be repeated with the filling function for each row to perform the same
check for each Pokemon:

Now, each row has a check for having more than 500 total stats:

https://www.w3schools.com/excel/excel_if.php 6/9
8/11/25, 11:21 AM Excel IF Function

 Tutorials  Exercises  Services   Sign In

ML  CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++

❮ Previous Next ❯

Track your progress - it's free! Sign Up Log in

https://www.w3schools.com/excel/excel_if.php 7/9
8/11/25, 11:21 AM Excel IF Function

COLOR PICKER 
 Tutorials  Exercises  Services  Sign In

ML  CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++



 PLUS SPACES

GET CERTIFIED FOR TEACHERS

FOR BUSINESS CONTACT US

Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial

Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference

https://www.w3schools.com/excel/excel_if.php 8/9
8/11/25, 11:21 AM Excel IF Function
Python Reference

 Tutorials  W3.CSS Reference


Exercises 
Bootstrap Reference
Services   Sign In
PHP Reference
ML  CSS JAVASCRIPT HTMLSQL Colors PYTHON JAVA PHP HOW TO W3.CSS C C++
Java Reference
Angular Reference
jQuery Reference

Top Examples Get Certified


HTML Examples HTML Certificate
CSS Examples CSS Certificate
JavaScript Examples JavaScript Certificate
How To Examples Front End Certificate
SQL Examples SQL Certificate
Python Examples Python Certificate
W3.CSS Examples PHP Certificate
Bootstrap Examples jQuery Certificate
PHP Examples Java Certificate
Java Examples C++ Certificate
XML Examples C# Certificate
jQuery Examples XML Certificate

    

FORUM ABOUT ACADEMY


W3Schools is optimized for learning and training. Examples might be simplified to improve
reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot
warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted our terms of use,
cookie and privacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.

https://www.w3schools.com/excel/excel_if.php 9/9

You might also like