# Excel nested functions

Once you've learned the basics of Excel functions, it's time to move on to a more complex topic:

Recall from our explanation of functions in Excel that a function is like a recipe: it contains a

## Working with nested functions

To nest functions within Excel, simply include the formula for one function as the argument to another. Recall that the formula for a function looks something like this:

=FUNCTION_NAME (argument_1 ,argument_2 ,argument_3 )

Output:Output

A nested, function, then, would look like something along the lines of this:

=FUNCTION_2_NAME (FUNCTION_NAME (argument_1 ,argument_2 ,argument_3 ),argument_2 ,argument_3 )

Output:Output

Notice that we've inserted one function directly into another as an argument, but kept the parentheses

Let's take a look at a practical example using the

=SUM (3 ,AVERAGE (7 ,9 ),15 )

Step 1: =SUM (3 ,8 ,15 )

Output:26

First, this formula takes the

## Even more layers of nesting

You can nest almost as many functions within each other as you'd like: Excel offers support for up to 64 layers of nested functions. This can lead to complex, layered formulas that are incredibly powerful, but sometimes difficult to decrypt. See whether you can figure out why the below multi-nested formula outputs what it does:

=SUM (SUM (AVERAGE (1 ,3 ),AVERAGE (5 ,7 )),SUM (12 ,10 ))

Output:30

Here's the full breakdown, for those looking for the answer key:

=SUM (SUM (AVERAGE (1 ,3 ),AVERAGE (5 ,7 )),SUM (12 ,10 ))

Step 1: =SUM (SUM (2 ,6 ),SUM (12 ,10 ))

Step 2: =SUM (8 ,22 )

Output:30

## When to use nested functions

Nested functions have many uses, and you're sure to come up with interesting and inventive ways of stringing them together that we could never dream of. That having been said, here are some of the most common uses of nested functions:

- Using nested logical functions and
IF statements for formulas that deal with a variety of different conditions; - Using lookup functions nested within each other; and
- Using multiple string functions to parse a complex phrase.

As you read the tutorials throughout the rest of this site, be sure to think of ways that you could combine the functions you learn about in new, powerful ways.

## Save an hour of work a day with these 5 advanced Excel tricks

Work smarter, not harder. Sign up for our 5-day mini-course to receive **must-learn lessons** on getting Excel to do your work for you.

- How to create
**beautiful table formatting**instantly... - Why to
**rethink the way you do VLOOKUPs**... - Plus, we'll reveal
**why you shouldn't use PivotTables**and what to use instead...