• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
EngineerExcel

EngineerExcel

FREE EBOOK
  • About
  • Excel Course
  • VBA Course
  • Free Training
  • Login

Nested IF Functions in Excel

In the last section, you saw how an IF function can be used to return one of two possible values. What if you have more than two possible results? Nested IF functions can be used for three or more possible outcomes.

Our example spreadsheet shows a simple case where a Reynold’s number will be evaluated to determine whether the flow is laminar, turbulent, or transitional.

Recall the syntax for the IF function: the second argument is returned if the condition is true, and the third argument is returned if the condition is false. So far, we have returned text strings, but Excel can also perform a function specified in an argument.

[Note: Want to learn even more about advanced Excel techniques? Watch my free training just for engineers. In the three-part video series I'll show you how to easily solve engineering challenges in Excel. Click here to get started.]

A single IF statement can only return 2 results. We can add a nested IF statement as one of the arguments to handle all three possible cases. Begin the function as follows:

=IF(C4<2100,”Laminar”,

This tells Excel that if the statement C4<2100 is true, it should return the string “Laminar.” However, if that statement is false, there are two possibilities. Therefore, we’ll use another IF statement as the value_if_false argument.

[Note: Want to learn even more about advanced Excel techniques? Watch my free training just for engineers. In the three-part video series I'll show you how to easily solve engineering challenges in Excel. Click here to get started.]

This third argument will be:

IF(C4>4000,”Turbulent”,”Transitional”)

The nested IF function will return the string “Turbulent” if the Reynold’s number is greater than 4000. Otherwise, it will return the string “Transitional.” The completed formula will be:

=IF(C4<2100,”Laminar”,IF(C4>4000,”Turbulent”,”Transitional”))

This function should meet the criteria on the right side of the worksheet. First, the function evaluates if the Reynold’s number is less than 2100; if so, it returns the string “Laminar.” If that statement is false, it performs the second IF function to check if the Reynold’s number is greater than 4000. If it is, it returns “Turbulent,” otherwise it returns “Transitional.” You can verify that your function works properly by entering different values for the Reynold’s number.

[Note: Want to learn even more about advanced Excel techniques? Watch my free training just for engineers. In the three-part video series I'll show you how to easily solve engineering challenges in Excel. Click here to get started.]

Primary Sidebar

Featured Posts

How to Use Excel Solver to Optimize Engineering Designs

Solving Systems of Simultaneous Nonlinear Equations in Excel

Basic Lookups in Excel with VLOOKUP and HLOOKUP

Linear Regression in Excel: 3 Alternative Methods

Calculate a Derivative in Excel from Tables of Data

About Me: Charlie Young, P.E.

I’m a licensed professional engineer with a degree in Mechanical Engineering and over a decade of practical experience building engineering applications in Excel. My goal is to help you learn how to turn Excel into a powerful engineering tool.

If you’re interested in learning more, click the button below to receive an update whenever I have a new tip to share. I’ll also send you a copy of my free eBook “10 Smarter Ways to Use Excel for Engineering”.


Subscribe Now

Footer

SOCIAL

Keep up with EngineerExcel:
  • Email
  • RSS
  • YouTube
EngineerExcel

Free Course

Navigation

  • Home
  • About
  • Free Course
  • Excel Tips
  • Resources
  • Coupon
  • Login

Support

  • Support
  • Terms
  • Privacy

Copyright © 2021 EngineerExcel.com · Log in