How to Use the IF-THEN Function in Excel 2022.


This short article explains ways to use the IF-THEN function in Stand out for Microsoft 365, Stand out 2019, 2016, 2013, 2010 Stand out for Mac, and Stand out Online, in addition to a couple of examples.

Inputting IF-THEN in Stand out

The IF-THEN function in Stand out is really a effective method to add making decisions for your spreadsheets. It tests an ailment to find out if it’s correct or false after which performs a particular group of instructions in line with the results.

For instance, by input an IF-THEN in Stand out, you can look at if your specific cell is more than 900. If it’s, you may make the formula return the written text “PERFECT.” Whether it is not, you may make the formula return “Not Big Enough.”

There are lots of conditions you are able to enter the IF-THEN formula.

The IF-THEN function’s syntax includes the specific function and also the function arguments within the parenthesis.

This is actually the proper syntax from the IF-THEN function:

=IF(logic test,value if true,value if false)

The IF area of the function may be the logic test. This is when you utilize comparison operators to check two values.

The THEN area of the function uses the very first comma and includes two arguments separated with a comma.

The very first argument informs the part how to proceed when the comparison holds true.

The 2nd argument informs the part how to proceed when the comparison is fake.

An Easy IF-THEN Function Example

Before getting to more complicated calculations, let us consider a straightforward illustration of an IF-THEN statement.

Our spreadsheet is to establish with cell B2 as $100. We are able to input the next formula into C2 to point if the value is bigger than $1000.

  • =IF(B2>1000,”PERFECT”,”Not Big Enough”)
  • This function has got the following arguments:
  • B2>1000 tests if the value in cell B2 is bigger than 1000.
  • “PERFECT” returns the term PERFECT in cell C2 if B2 is bigger than 1000.
  • “Not Big Enough” returns the saying Not Big Enough in cell C2 if B2 isn’t bigger than 1000.

The comparison area of the function compares 3 values. Either of individuals two values could be:

  • Fixed number
  • A string of figures (text value)
  • Date or time
  • Functions that return the values above
  • A reference holiday to a cell within the spreadsheet that contains any of these values

The Real or FALSE area of the function may also return any of these. Which means that you may make the IF-THEN function very advanced by embedding additional calculations or functions within it (see below).

When inputting true or false conditions of the IF-THEN statement in Stand out, you should utilize speech marks around any text you need to return, unless of course you are using TRUE and FALSE, which Stand out instantly recognizes. Other values and formulas do not require speech marks.

Inputting Calculations In to the IF-THEN Function

You are able to embed different calculations for that IF-THEN function to do, with respect to the comparison results.

Within this example, one calculation can be used to calculate the tax owed, with respect to the total earnings in B2.

  • The logic test compares total earnings in B2 to find out if it’s more than $50,000.00.
  • =IF(B2>50000,B2*.15,B2*.10)
  • Within this situation, that’s B2*.10, that is 4000.
  • It makes sense put into cell C2, in which the IF-THEN function is placed, is going to be 4000.
  • You may also embed calculations in to the comparison side from the function.
  • For instance, if you wish to estimate that taxed earnings are only 80% of total earnings, you can alter the above IF-THEN function towards the following.
  • =IF(B2*.8>50000,B2*.15,B2*.10)
  • This can carry out the calculation on B2 before evaluating it to 50,000.

Never enter a comma when entering figures within the thousands. It is because Stand out interprets a comma because the finish of the argument in a function.

  • A good example of embedding calculations within an IF-THEN function in Stand out.
  • Nesting Functions Within an IF-THEN Function
  • You may also embed (or “nest”) the purpose within an IF-THEN function.

This enables you to perform advanced calculations after which compare the particular leads to the expected results.

Within this example, let us if you have a spreadsheet with five students’ grades in column B. You can average individuals grades while using AVERAGE function. With respect to the class average results, you might have cell C2 return either “Excellent!” or “Needs Work.”

This is the way you’d input when-THEN function:

=IF(AVERAGE(B2:B6)>85,”Excellent!”,”Needs Work”)

This function returns the written text “Excellent!” in cell C2 when the class average has ended 85. Otherwise, it returns “Needs Work.”

As you can tell, inputting the IF-THEN function in Stand out with embedded calculations or functions enables you to definitely create dynamic and highly functional spreadsheets.

Was this site useful?


Please enter your comment!
Please enter your name here