Quick, clean, and to the point

How to use function arguments

You've probably noticed that functions use parentheses, and inside those parentheses are certain inputs. These inputs have a special name: arguments.

Let's look at some examples.

Arguments can be required or optional. Some functions take 3 or more arguments, and some functions don't take any arguments at all.

A good example of a function that takes no arguments is the TODAY function, which returns the current date. To use it, just enter TODAY with empty parentheses.

Other functions take multiple arguments, all of which are required. A good example is the DATE function, which allows you to build a valid date using the year, month, and day supplied as separate and required arguments.

Note that as you enter a function that Excel recognizes, Excel will display a tip window with information on all arguments.

The current argument is in bold text, and each argument must be separated with a comma. As you enter arguments and commas, you'll see each argument bolded in turn.

Excel doesn't care whether the commas are followed by spaces or not.

Some functions have optional arguments, which are shown in square brackets inside the formula tip window.

An example of a function that takes an optional argument is the ROW function. Without the argument, ROW returns the row of the cell it is located in. However, if you supply reference, ROW returns the row number of that reference. For example, if we supply H10, ROW returns 10.

Some functions can take a large number of optional arguments. A good example is the SUM function. SUM's arguments are named number1, number2, number3, and so on.

The concept of additional optional arguments is expressed with the elipses, which appear at the end of the argument list when a function takes multiple optional arguments.

The SUM function can actually accept up to 256 arguments total. By using commas to separate arguments, we can easily sum the contents of cell H3 with two other ranges. A little trick you can use with SUM is to hold down the Control key as you select additional cells. Excel will then add the commas for you.

In many cases, you won't supply arguments as hard coded values, since that defeats the power of a spreadsheet. Instead, you'll supply values that come from other cells.

As an example, the EDATE function takes two arguments, a start date, and months, and then returns the same date in future or past.

When you expose arguments as cells on the worksheet, you can supply cell references for arguments. This allows you to easily change input values later, and get a different result from the function.

Core Formula

Related shortcuts

Dave Bruns