IF and IFS functions in Excel: Usage and specific examples

Video IF and IFS functions in Excel: Usage and specific examples

The IF and IFS functions in Microsoft Excel are two of the logical functions used quite commonly for Microsoft Office users . In simplest terms, the IF / IFS function will return results based on one or several input comparison data.

Note :For examples and syntaxes of the IF and IFS functions below, we use a semicolon ( ; ) to separate, if in case the function reports an error or no output, please replace the semicolon ( ; ) with a comma ( , ).

IF function in Excel

With the IF function in Excel, you can perform a lot of different calculations including conditional formatting. For example, you can use it as an IF to classify students based on GPA, use the IF function to calculate numbers ...

An IF statement will return two results including the first one if the condition is TRUE, and the second one will be executed for the remaining conditions (FALSE).

IF function syntax

= IF ( Condition ; Do something if condition is true ; Do something with the other case )

If the above formula makes you confusing, please refer to the usage and the IF function examples in the content below. 

Some examples in using the IF function

  • The IF function compares text (example): in the example below, cell D2 says: IF (C2 = Yes , then return 1 , otherwise return 2)

IF and IFS functions in Excel: Usage and specific examples

  • The IF function compares numbers: for example, in cell D2 says: IF (C2 = 1 , then returns Yes , otherwise returns No )

IF and IFS functions in Excel: Usage and specific examples

  • The IF function is larger than:

IF and IFS functions in Excel: Usage and specific examples
The formula in cell D2 will be: = IF (C2> B2; "Over Budget"; "In Budget")

  • The IF function returns the result of a mathematical calculation:

IF and IFS functions in Excel: Usage and specific examples
The formula in cell D2 will be: = IF (C2> B2; C2-B2; 0)

Use the IF function to check if a cell is blank

Sometimes you need to check if a cell is empty or not, usually because you don't want a formula to display the result without input. In this case, we will use the IF function together with the ISBLANK function :

IF and IFS functions in Excel: Usage and specific examples
The formula in cell D2 will be: = IF (ISBLANK (D2); "Blank"; "Not Blank")

In the next example, we will use "" instead of the ISBLANK function. The "" sign essentially means "nothing".

IF and IFS functions in Excel: Usage and specific examples
The formula in cell E2 is = IF (D3 = ""; "Blank"; "Not Blank")

In addition, the following is an example of a common method using "" to prevent a formula from performing calculations if an independent cell is empty:

= IF (D3 = ""; ""; Formula)

Explanation : IF (D3 has nothing, it returns no results, otherwise calculates your formula).

IF function nested to combine multiple conditions

While the simple IF function only has two results ( True or False ), the nested IF function can have 3 to 64 results.

= IF (D2 = 1; "YES"; IF (D2 = 2; "No"; "Maybe")

IF and IFS functions in Excel: Usage and specific examples

Explain the formula in cell E2: IF (D2 = 1 then return "Yes", otherwise IF (D2 = 2 then return "No", otherwise return "Perhaps") . Note that there are two closing parentheses at the end of the formula to complete both IF functions. If you try to enter a formula without both parentheses, Excel automatically adds the last closing parenthesis for you.

IFS function in Excel

If the IF function alone is enough to use the basic conditions, IFS will make you feel better because IFS will combine multiple IF functions in a single IFS. In other words, instead of using multiple nested IFs, you only need to use IFS.

IFS function syntax

= IFS ( Condition 1 ; Value if DK1 is correct ; Condition 2 ; Value if DK2 is correct ; Condition 3 ; Value if DK3 is true ; .............)

The IFS function can test up to 127 different conditions, but you should not nest too many conditions because it will be difficult to check if errors or data conflicts occur.

Example using IFS function

IF and IFS functions in Excel: Usage and specific examples

The formula for the cells in column B is: = IFS (A2> 89; "A"; A2> 79; "B"; A2> 69; "C"; A2> 59; "D"; TRUE; "F" )

Does that mean:

  • If cells A2> 89, enter A
  • If cell A2> 79, enter B
  • If cell A2> 69, enter C
  • If cells A2> 59, enter D
  • and in other cases, fill in F
Sign up and earn $1000 a day ⋙

Leave a Comment

How to fix the error of printing blank pages in Microsoft Excel

How to fix the error of printing blank pages in Microsoft Excel

How to fix the error of printing blank pages in Microsoft Excel. Why do some Excel documents not display data or contain blank pages when printed? Below are the reasons

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar

How to pin Word, Excel and PowerPoint files to the corresponding app icon on the Windows 11 taskbar, How to pin Office files to the taskbar icon on Windows 11? Invite

How to fix the error of not being able to save Excel files on Windows

How to fix the error of not being able to save Excel files on Windows

How to fix the error of not being able to save an Excel file on Windows. If you can't save the Excel file, don't worry too much. Below are ways to fix the error of not being able to save the above Excel file

How to insert a picture into a cell using VBA in Excel

How to insert a picture into a cell using VBA in Excel

How to insert a picture into a cell using VBA in Excel, You can easily insert pictures into Excel spreadsheets and edit them with macro code. Here's how to insert images

How to enable auto-capitalization of the first letter of a sentence in Excel

How to enable auto-capitalization of the first letter of a sentence in Excel

How to enable auto-capitalization of the first letter of a sentence in Excel, Turning on the automatic-capitalization of the first letter of a sentence in Excel will save you a lot

How to calculate seniority work on Excel spreadsheets

How to calculate seniority work on Excel spreadsheets

Through this tutorial, WebTech360 will guide you how to calculate the seniority of a list of employees in the company via Microsoft Excel spreadsheet or WPS Spreadsheets.

Learn Excel - Lesson 6: How to filter unique values ​​and delete duplicate values ​​in Excel

Learn Excel - Lesson 6: How to filter unique values ​​and delete duplicate values ​​in Excel

Filtering unique values ​​and deleting duplicate data is a basic operation that everyone needs to know when using Excel. Join us to learn how to do it in Excel!

How to use VLOOKUP, INDEX, ... in Excel you should know

How to use VLOOKUP, INDEX, ... in Excel you should know

The functions VLOOKUP, INDEX, MATCH, ... are quite complex functions but are effective in data mining in Excel. In this article, I will guide you in detail how to use VLOOKUP and related functions effectively.

Instructions for deleting horizontal lines in Word

Instructions for deleting horizontal lines in Word

Word, an indispensable tool for office workers when editing documents and editing documents to create professionally presented and arranged documents, Word often comes with Excel and PowerPoint in the Microsoft Office suite, caters to many types

Learning Excel - Lesson 11: Importing and exporting text files

Learning Excel - Lesson 11: Importing and exporting text files

There are two simple ways to import data from a text file (.txt or .csv) into Excel. To export data from Excel to a text file, use the Save As command and change the file type from the drop-down menu.

What is the difference between Excel and OpenOffice?

What is the difference between Excel and OpenOffice?

OpenOffice is an office suite built on open source. Like Excel, this toolkit can be used on computer systems using Windows or Linux operating systems.

How to insert a PDF file into Excel

How to insert a PDF file into Excel

Adding PDF files to Excel will make working with this spreadsheet tool much more efficient and professional.

Instructions for sending emails from Excel spreadsheets using VBA scripts

Instructions for sending emails from Excel spreadsheets using VBA scripts

Using VBA scripts in Excel does not require any programming knowledge. VBA helps you do many advanced tasks such as creating a spreadsheet report containing all PC information, emailing directly from a spreadsheet ...

Create charts that automatically update data in Excel 2016

Create charts that automatically update data in Excel 2016

You can create automatically updated charts according to newly added data in Excel with just three simple steps.

How to Quickly Create Engaging Product Demos With Vidnoz AI

How to Quickly Create Engaging Product Demos With Vidnoz AI

Looking to create engaging product demos in minutes? Look no further! This guide will introduce you to the best tool for the job.

Zooper Widget for Android 2.36 - Latest Version Updates for 2024 and 2025

Zooper Widget for Android 2.36 - Latest Version Updates for 2024 and 2025

Discover the latest updates in Zooper Widget for Android. Zooper Widget is a compact, highly customizable, and battery-friendly widget with endless possibilities.

Lipp for iOS 4.4 - Make lip sync and voiceover videos on iPhone / iPad 2024, 2025

Lipp for iOS 4.4 - Make lip sync and voiceover videos on iPhone / iPad 2024, 2025

Lipp for iOS, alongside Dubsmash and Musical.ly, provides iPhone and iPad users with a new platform to create lip sync videos and dub videos readily.

How to Share Audio with TeamViewer - Latest Version Updates 2024, 2025

How to Share Audio with TeamViewer - Latest Version Updates 2024, 2025

Learn how to share audio using TeamViewer, including the latest updates for 2024 and 2025, making remote communication more effective.

Adorable Home: Latest Tips for Petting Your Cat in 2024 and 2025

Adorable Home: Latest Tips for Petting Your Cat in 2024 and 2025

Learn the latest tips on how to pet a cat in Adorable Home for optimal gameplay in 2024 and 2025. Discover what positions give you hearts.

OrangeHRM Open Source 3.2.1 - Latest Features for 2024 and Beyond

OrangeHRM Open Source 3.2.1 - Latest Features for 2024 and Beyond

Explore the latest features of OrangeHRM Open Source, a free HR management system tailored to meet evolving business needs in 2024 and 2025.

How to Fix IDM Error Not Catching Download Links - Updates for 2024 and 2025

How to Fix IDM Error Not Catching Download Links - Updates for 2024 and 2025

Fix IDM not catching file download links. Discover solutions for downloading videos, music, and more with the latest IDM updates in 2024 and 2025.

The File Converter for Android - Convert files to other formats - Updated Versions 2024, 2025

The File Converter for Android - Convert files to other formats - Updated Versions 2024, 2025

Discover the latest version of The File Converter for Android, an application that converts various file formats efficiently.

Updated Zalo Web Login Features for 2024-2025

Updated Zalo Web Login Features for 2024-2025

Explore the latest features of Zalo Web, allowing users to chat and connect seamlessly on various browsers without installation.

PDF Password Remover 6.0 - The Ultimate Solution for Password Removal in PDF Files

PDF Password Remover 6.0 - The Ultimate Solution for Password Removal in PDF Files

PDF Password Remover is a powerful tool for removing passwords and restrictions from PDF files. Download the latest version for 2024 to experience enhanced features.

Latest Instructions for Completely Removing Internet Download Manager (IDM) - Updated for 2024 and 2025

Latest Instructions for Completely Removing Internet Download Manager (IDM) - Updated for 2024 and 2025

Step-by-step instructions to completely remove Internet Download Manager (IDM) from your system in 2024 and 2025. Learn to uninstall IDM effectively and cleanly.

Mindjet MindManager 2024 & 2025 - Empower Your Mind Mapping

Mindjet MindManager 2024 & 2025 - Empower Your Mind Mapping

Discover Mindjet MindManager, an innovative software that helps individuals and teams streamline their work processes through effective mind mapping and project management.

Su Doku 2.0.0 - Latest Updates 2024 & 2025

Su Doku 2.0.0 - Latest Updates 2024 & 2025

Su DoKu 2.0.0 is an advanced Sudoku game design software that captivates enthusiasts with its simplicity and functionality. Download now and challenge yourself with Sudoku puzzles.

Google Photos for Android - Unlimited Photo and Video Storage with Latest Features in 2024, 2025

Google Photos for Android - Unlimited Photo and Video Storage with Latest Features in 2024, 2025

Discover the new features of Google Photos for Android in 2024 and 2025, including faster backup and advanced search capabilities.

Updated IQmango DVD Ripper 2024 - New Features and Enhancements

Updated IQmango DVD Ripper 2024 - New Features and Enhancements

Discover the latest version of IQmango DVD Ripper in 2024, a powerful software to easily rip, copy, convert, and back up DVDs.

Sign up and Earn ⋙
Sign up and Earn ⋙