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

Leave a Comment

How to fix #SPILL! error in Microsoft Excel

How to fix #SPILL! error in Microsoft Excel

The #SPILL! error in Excel is quite common and it is quite simple to fix. Here is how to fix the #SPILL! error easily in Excel.

How to use the FILTER function in Excel

How to use the FILTER function in Excel

If you regularly work with data sets in Excel, you know how important it is to be able to quickly find the information you need.

Why Checkbox is an underutilized Excel feature?

Why Checkbox is an underutilized Excel feature?

On the surface, Excel Checkboxes seem like a very simple feature - which is probably why they are often overlooked.

Why Excel is the only project management tool you need?

Why Excel is the only project management tool you need?

Many people have tried many project management tools, but still come back to Excel for project management. While it may not be perfect for everyone, it is a simple, yet effective solution that you already know how to use.

Microsoft allows users to use Office applications on Windows for free, but with some limitations.

Microsoft allows users to use Office applications on Windows for free, but with some limitations.

Microsoft recently raised the price of its Microsoft 365 subscription, justifying the change by adding more AI experiences to the service.

TRUNC Function: How to remove decimals and shorten numeric values

TRUNC Function: How to remove decimals and shorten numeric values

There are different ways in Excel to remove decimals and shorten numeric values. In this article, Quantrimang.com will explain how to use the TRUNC function and point out what makes it different from other techniques.

SUBTOTAL Function: Calculates the total value of a filtered list in Excel

SUBTOTAL Function: Calculates the total value of a filtered list in Excel

The sum function when filtering data is very important for Microsoft Excel users. This article will summarize for you how to filter and calculate sum in Excel using Subtotal.

How to Export Airtable to Excel and Google Sheets

How to Export Airtable to Excel and Google Sheets

Airtable lets you create and share relational databases easily. Export your Airtable data to Google Sheets or Excel to enjoy the benefits of advanced charts and data visualization.

Effective ways to use ChatGPT in Excel

Effective ways to use ChatGPT in Excel

Curious about how ChatGPT can enhance your Excel experience? Here are some tips for using ChatGPT in Excel.

How to use the WORKDAY function in Microsoft Excel

How to use the WORKDAY function in Microsoft Excel

In Microsoft Excel, the WORKDAY function is a date and time function and its purpose is to return the date before and after the specified number of working days. Working days do not include weekends or any days defined as holidays.

Why are so many people stopping using Google Sheets and going back to Excel?

Why are so many people stopping using Google Sheets and going back to Excel?

For a while, Google Sheets lured people away from Excel. But many people came back after realizing that Google Sheets is far from beating Excel.

How to use the TREND function in Excel

How to use the TREND function in Excel

You can calculate and visualize trends in Excel using the TREND function. Here's how to use the TREND function in Microsoft Excel.

How to enable and disable macros on Excel

How to enable and disable macros on Excel

The following article will guide readers how to enable and disable macros in Excel 2007, 2010, 2013 and 2016.

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 Microsoft Teams Win 7 Error Compatibility

How to Fix Microsoft Teams Win 7 Error Compatibility

Struggling with Microsoft Teams "Win 7 Error" compatibility? Discover step-by-step fixes to restore seamless video calls and chats on unsupported Windows versions. Quick, reliable solutions inside!

Troubleshooting Microsoft Teams Breakout Rooms License Errors

Troubleshooting Microsoft Teams Breakout Rooms License Errors

Master troubleshooting Microsoft Teams Breakout Rooms license errors with this step-by-step guide. Quick fixes for common license issues, admin checks, and prevention tips to get your meetings running smoothly.

How to Fix Microsoft Teams Version History Error

How to Fix Microsoft Teams Version History Error

Struggling with Microsoft Teams "Version History" Error? Discover proven, step-by-step fixes to restore access instantly. Clear cache, update Teams, and more—no tech skills needed!

Solving Microsoft Teams Joining Error: Meeting ID Not Found

Solving Microsoft Teams Joining Error: Meeting ID Not Found

Tired of the frustrating Microsoft Teams Joining Error: Meeting ID Not Found? Get step-by-step fixes to rejoin meetings fast. Updated with the latest Teams patches for seamless collaboration. Solve it now!

Troubleshooting Microsoft Teams Video Error Green Screen

Troubleshooting Microsoft Teams Video Error Green Screen

Struggling with Microsoft Teams "Video Error" green screen? Discover proven, step-by-step troubleshooting fixes for seamless video calls. Quick solutions inside!

How to Fix Microsoft Teams How Teams Works Tutorial Error

How to Fix Microsoft Teams How Teams Works Tutorial Error

Struggling with the Microsoft Teams "How Teams Works" Tutorial Error? Discover proven, step-by-step fixes to resolve it quickly. Clear cache, update, and more for seamless onboarding. Works on latest versions!

How to Fix Microsoft Teams Error Today on Windows 10

How to Fix Microsoft Teams Error Today on Windows 10

Tired of the frustrating Microsoft Teams "Error Today" on Windows 10? Discover proven, step-by-step fixes to resolve it quickly and restore smooth teamwork. No tech skills needed!

Troubleshooting Microsoft Teams Room Basic vs Pro Errors

Troubleshooting Microsoft Teams Room Basic vs Pro Errors

Struggling with Troubleshooting Microsoft Teams Room Basic vs Pro Errors? Get step-by-step fixes for common issues, comparisons, and pro tips to resolve connectivity, licensing, and setup problems fast in both versions.

How to Fix Microsoft Teams Screen Sharing Lag in 2026

How to Fix Microsoft Teams Screen Sharing Lag in 2026

Tired of Microsoft Teams screen sharing lag ruining your 2026 meetings? Get instant fixes for lag, freezes, and poor quality. Proven steps to optimize performance and share screens flawlessly. Boost productivity today!

Troubleshooting Microsoft Teams Installation Errors on macOS

Troubleshooting Microsoft Teams Installation Errors on macOS

Struggling with Microsoft Teams installation errors on macOS? This ultimate guide provides proven, step-by-step fixes for common issues like Gatekeeper blocks, permission errors, and download failures to get Teams running smoothly on your Mac. Updated with the latest solutions.

How to Create and Manage a Bot in Microsoft Teams (2026)

How to Create and Manage a Bot in Microsoft Teams (2026)

Master how to create and manage a bot in Microsoft Teams (2026) with this expert guide. From setup to advanced management, unlock productivity boosts using the latest Bot Framework and Azure tools.

Troubleshooting Microsoft Teams Remote Control Request Error

Troubleshooting Microsoft Teams Remote Control Request Error

Tired of Microsoft Teams "Remote Control" Request Error blocking your meetings? Follow our proven, step-by-step troubleshooting guide with the latest fixes to restore seamless remote control and boost productivity instantly.

How to Fix Microsoft Teams Planner Error: Tasks Not Loading

How to Fix Microsoft Teams Planner Error: Tasks Not Loading

Struggling with Microsoft Teams Planner error where tasks not loading? Discover step-by-step fixes for Microsoft Teams Planner Error: Tasks Not Loading. Quick solutions for instant relief in Teams Planner. Updated with latest troubleshooting tips.

Troubleshooting Microsoft Teams Version History Errors

Troubleshooting Microsoft Teams Version History Errors

Tired of Microsoft Teams version history errors disrupting your workflow? This step-by-step troubleshooting guide covers common issues, quick fixes, and pro tips to restore seamless file versioning in Teams. Updated with the latest solutions!

Solving Microsoft Teams Error 2400: Unable to Connect to Servers

Solving Microsoft Teams Error 2400: Unable to Connect to Servers

Tired of Microsoft Teams Error 2400 blocking your connection? Follow our proven, step-by-step fixes to solve "Unable to Connect to Servers" and get back to productive meetings fast.