Let’s look at some examples. Arguments can be required or optional. Some functions take three 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 an equal sign, TODAY, and 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 will be displayed in bold text. Each additional argument must be separated with a comma. As you enter arguments and commas, you’ll see each argument bolded in turn. Note that Excel doesn’t care whether 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 any arguments, ROW returns the row of the cell it’s located in. However, if you supply a reference, ROW returns the row number of that reference. For example, if we supply H10 as the reference, ROW returns the number 10. Some functions can take a large number of optional arguments. A good example is the SUM function. The concept of additional optional arguments is expressed with ellipses, 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 many cells at the same time. A little trick you can use with the SUM function 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 the future or past. When you expose arguments as cells on the worksheet, you can supply cell references as arguments. This allows you to easily change the input values later, and get a different result from the function.
Dave Bruns
Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.