Can you use if function with text in Excel? 2022.

August 12, 2022

This information explains how you can operate the IF-THEN function in Stand out for Microsoft 365, Stand out 2019, 2016, 2013, 2010 Stand out for Mac, and Stand out Online, furthermore to some couple of examples.

Inputting IF-THEN in Stand out

The IF-THEN function in Stand out could be a effective method of add choice for the spreadsheets. It tests an condition to find out if the reality is or false then performs a particular quantity of instructions while using results.

For instance, by input an IF-THEN in Stand out, you can test in situation your particular cell is a lot more than 900. Be it, you can create the formula return the writing “PERFECT.” Be it not, you can create the formula return “Not Huge Enough.”

There are many conditions you can enter in the IF-THEN formula.

The IF-THEN function’s syntax includes the specific function along with the function arguments within the parenthesis.

This can be truly the correct syntax within 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 evaluate two values.

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

The first argument informs the part how to handle it when the comparison holds true.

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

An Easy IF-THEN Function Example

Prior to to harder calculations, let us consider an easy demonstration of an IF-THEN statement.

Our spreadsheet is determined with cell B2 as $100. We’re able to input the next formula into C2 to point out once the value is bigger than $1000.

  • =IF(B2>1000,”PERFECT”,”Not Huge Enough”)
  • This function will get the next arguments:
  • B2>1000 tests once the value in cell B2 is bigger than 1000.
  • “PERFECT” returns the term PERFECT in cell C2 if B2 is bigger than 1000.
  • “Not Huge Enough” returns the word Not Huge 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 may be:
  • Fixed number
  • A string of figures (text value)
  • Date or time
  • Functions that return the above mentioned
  • A reference on the vacation cell within the spreadsheet containing these values
  • The Particular or FALSE area of the function may also return these. Meaning you can create the IF-THEN function very advanced by embedding additional calculations or functions there (see below).

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

Inputting Calculations Towards the IF-THEN Function

You can embed different calculations for the IF-THEN function to accomplish, according to the comparison results.

During this example, one calculation enables you to calculate the tax owed, according to the total earnings in B2.

  • The logic test compares total earnings in B2 to find out whether it’s more than $50,000.00.
  • =IF(B2>50000,B2*.15,B2*.10)
  • During this example, B2 isn’t bigger than 50,000, so the “value_if_false” condition will calculate and return that result.
  • During this situation, that’s B2*.10, that’s 4000.
  • It appears sensible place in cell C2, in which the IF-THEN function lies, will most likely be 4000.
  • You may also embed calculations towards the comparison side within the function.

For instance, if you wish to estimate that taxed wages are only 80% of total earnings, you’ll be able to modify the above IF-THEN function for an additional.

  • =IF(B2*.8>50000,B2*.15,B2*.10)
  • This might perform calculation on B2 before evaluating it to 50,000.
  • Never enter a comma when entering figures within the thousands. Because Stand out interprets a comma because the finish in the argument in the function.
  • Among embedding calculations in a IF-THEN function in Stand out.

Nesting Functions In a IF-THEN Function

You may also embed (or “nest”) the main reason in a IF-THEN function.

This enables you to definitely perform advanced calculations then compare the particular leads to the expected results.

During this example, let us for individuals who’ve a spreadsheet with five students’ grades in column B. You’ll be able to average individuals grades when using the AVERAGE function. According to the class average results, you might have cell C2 return either “Excellent!” or “Needs Work.”

This is why you’d input when-THEN function:

  • =IF(AVERAGE(B2:B6)>85,”Excellent!”,”Needs Work”)
  • This function returns the writing “Excellent!” in cell C2 when the class average is completed 85. Otherwise, it returns “Needs Work.”
  • As we discussed, inputting the IF-THEN function in Stand out with embedded calculations or functions enables you to definitely certainly create dynamic and highly functional spreadsheets.
  • Embedding other functions in the IF-THEN function in Stand out.

Was this site useful?