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 ⋙

IObit Malware Fighter 11 Review 2024

IObit Malware Fighter 11 Review 2024

When your computer gets attacked by a virus or malware, you’ll certainly such for a powerful antivirus to fight back. Well, IObit Malware Fighter is exactly what you need. From its name alone, you can be certain that you are getting the tough protection your computer needs.

How To Find Quality And Fast Internet In Montreal

How To Find Quality And Fast Internet In Montreal

Montreal, a city brimming with culture, history, and Poutine (a famous Canadian dish), deserves an internet connection that can keep up. Whether you’re a streamer glued to Twitch, a workaholic juggling video conferences, or a casual web surfer, a reliable and fast internet plan is essential.

Google Drive for desktop will be discontinued in March 2018

Google Drive for desktop will be discontinued in March 2018

Google Drive for desktop will be discontinued in March 2018, Google has officially announced that it will stop supporting Google Drive for desktop and then the company will remove the application.

Simple ways to fix AirDrop not working error

Simple ways to fix AirDrop not working error

Simple ways to fix AirDrop not working error, AirDrop not working on iPhone, iPad, Mac what to do? This article will provide you with simple ways

TOP best computer screen recording software 2024

TOP best computer screen recording software 2024

TOP best computer screen recording software 2024, Which is the best lightweight, free, high-quality computer screen recording software? Let's find out the top with WebTech360

What is an email address? How to get an email address?

What is an email address? How to get an email address?

What is an email address? How to get an email address?, What is an email address? What is email address entry? This article will answer all your related questions

Every WhatsApp shortcut for computer you need to know

Every WhatsApp shortcut for computer you need to know

Every WhatsApp shortcut for your computer you need to know, WhatsApp is one of the most popular free messaging apps today. The keyboard shortcuts below will help

Unlocking Baccarats Social Thrills: Tedbets Global Gaming Hub

Unlocking Baccarats Social Thrills: Tedbets Global Gaming Hub

Discover the vibrant social scene of baccarat on Tedbet, where players worldwide connect, chat, and enjoy the excitement of live dealer games.

Summary of how to find videos on TikTok

Summary of how to find videos on TikTok

Summary of how to find videos on TikTok, Finding videos on TikTok is not difficult. Let's learn together how to find the original video on TikTok or find the Tik Tok clip you want to watch

Improved mouse sensitivity for Free Fire on BlueStacks

Improved mouse sensitivity for Free Fire on BlueStacks

Improved mouse sensitivity for Free Fire on BlueStacks, BlueStacks has made important improvements for Free Fire gamers. Please upgrade BlueStacks 4.230.10

Huang you: Butter Camera sparkling photo editing app

Huang you: Butter Camera sparkling photo editing app

Huang you: Sparkling photo editing application Butter Camera, Huang you (黄油 相机) is an extremely hot Chinese editing application today, here we would like to invite you

Tips for using Chrome Web Store you need to know

Tips for using Chrome Web Store you need to know

Tips for using Chrome Web Store you need to know, Chrome Web Store or Chrome Web Store offers a selection of apps, extensions and stylish browser wallpapers

What is CapCut? Is it safe to use CapCut?

What is CapCut? Is it safe to use CapCut?

What is CapCut? Is it safe to use CapCut?, What is CapCut? Is music on CapCut copyrighted? Let's find out with WebTech360 what you need to know about CapCut!

Why is buying TikTok coins cheaper on PC?

Why is buying TikTok coins cheaper on PC?

Why is it cheaper to buy TikTok coins on PC?, TikTok gives users the option to exchange real money for coins in the app. However, buying TikTok coins on PC is cheap

How much Internet capacity does Zoom use?

How much Internet capacity does Zoom use?

How much Internet capacity does Zoom use?, Zoom is an indispensable remote online learning and working software during the epidemic, but it can be extremely bandwidth-consuming.

EmuOS: Relive your childhood with legendary games of the past

EmuOS: Relive your childhood with legendary games of the past

EmuOS: Relive your childhood with legendary games of the past, EmuOS is a Web interface that simulates basic Windows 3.1, 95, 98, NT operating systems that provide a lot

TOP best ways to open and read PDF files on your computer

TOP best ways to open and read PDF files on your computer

TOP best ways to open and read PDF files on your computer. How to open PDF files on your computer is not too difficult. In fact, you have many ways to read PDF files. Join WebTech360

Iris in Free Fire: Skills, weapons, skill combos

Iris in Free Fire: Skills, weapons, skill combos

Iris in Free Fire: Skills, weapons, skill combos, Iris is the newest female character in Free Fire OB35, with the ability to break the meta. Here's everything you need to know

What should I do if Netflix is ​​hacked?

What should I do if Netflix is ​​hacked?

What should I do if my Netflix account is hacked? What should I do if my Netflix account is hacked? Here's what you need to know when your Netflix account is hacked.

Tips for using LDPlayer you may not know

Tips for using LDPlayer you may not know

Tips for using LDPlayer you may not know. LDPlayer is one of the most popular Android emulators on computers today. This article will provide it to you