How do I write a nested IFERROR statement in Excel? 2

How do I write a nested IFERROR statement in Excel?

A nested IFERROR statement in Excel is a formula that allows you to check for multiple errors within a single formula and return a specific value or calculation if any of those errors occur. This can be useful when dealing with complex formulas or large datasets that may contain errors. To write a nested IFERROR statement, you will need to use the IFERROR function multiple times within a single formula, with each function checking for a different error. This allows you to create a hierarchy of potential errors and corresponding values or calculations to be returned. By using a nested IFERROR statement, you can ensure that your Excel spreadsheet is able to handle errors effectively and provide accurate results.

Write a Nested IFERROR Statement in Excel


You can use the following syntax to write a nested IFERROR statement in Excel:

=IFERROR(VLOOKUP(G2,A2:B6,2,0),IFERROR(VLOOKUP(G2,D2:E6,2,0), ""))

This particular formula looks for the value in cell G2 in the range A2:B6 and attempts to return the corresponding value in the second column of that range.

If the value in cell G2 is not found in the first range, Excel will then look for it in the range D2:E6 and return the corresponding value in the second column of that range.

If the value in cell G2 is also not found in that range, a blank is returned.

The following example shows how to use this syntax in practice.

Example: Write a Nested IFERROR Statement in Excel

Suppose we have the following datasets in Excel that contain information about various basketball teams:

We can write the following nested IFERROR statement to return the points values associated with various teams:

=IFERROR(VLOOKUP(G2,$A$2:$B$6,2,0),IFERROR(VLOOKUP(G2,$D$2:$E$6,2,0), ""))

The following screenshot shows how to use this formula in practice:

Nested IFERROR statement in Excel

This formula first looks for the team name in column G in the range A2:B6 and attempts to return the corresponding points value.

If the formula doesn’t find the team name in the range A2:B6, it then looks in the range D2:E6 and attempts to return the corresponding points value.

If it doesn’t find the team name in either range, it simply returns a blank value.

We can see that the team name “Kings” doesn’t exist in either range so the points value for that team is simply a blank value.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

Cite this article

stats writer (2024). How do I write a nested IFERROR statement in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-do-i-write-a-nested-iferror-statement-in-excel/

stats writer. "How do I write a nested IFERROR statement in Excel?." PSYCHOLOGICAL SCALES, 29 Jun. 2024, https://scales.arabpsychology.com/stats/how-do-i-write-a-nested-iferror-statement-in-excel/.

stats writer. "How do I write a nested IFERROR statement in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-do-i-write-a-nested-iferror-statement-in-excel/.

stats writer (2024) 'How do I write a nested IFERROR statement in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-do-i-write-a-nested-iferror-statement-in-excel/.

[1] stats writer, "How do I write a nested IFERROR statement in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How do I write a nested IFERROR statement in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top