Understanding the Components of a Function

In Excel, a function has a name written in capitals followed by a pair of parentheses, which enclose the pieces of data (if any) the function needs. Here are three examples:

  • SUM(). This widely used function adds together two or more values that you specify.
  • COUNT(). This function counts the number of cells that contain numbers (as opposed to text, blanks, or other data types) in the range you specify.
  • TODAY(). This function enters the current date in the cell.

Most functions take arguments, pieces of information that tell the function what you want it to work on. Excel prompts you to provide the arguments each function needs. For example, when you enter the function in a cell, Excel displays a ScreenTip showing the arguments needed. Figure 6–1 shows an example using the SUM()function.

images

Figure 6–1. When you enter a function in a cell, Excel prompts you to supply the arguments it needs.

The ScreenTip shows that the SUM() function has one required argument and one optional argument, and you can add further arguments as needed:

  • Required argument. Each required argument appears without brackets, like the argument number1 in the ScreenTip. You separate the arguments with commas, as in the example in the next paragraph. For example, you can use SUM() to add the values of cells in a range: SUM(C1:C10). Here, C1:C10 is a single argument, the required argument.
  • Optional argument. Each optional argument appears in brackets, like the argument [number2] in the ScreenTip. For example, you can use SUM() to add the values of two cells: SUM(C1,C3). Here, C1 is the required argument, and C3 is the first optional argument.
  • Extra arguments. The ellipsis (…) shows that you can enter extra arguments of the same type. For example, you can use SUM() to add the values of many cells: SUM(C1,C3,D4,D8,E1,XF202). Here, C1 is the required argument, and all the other cell references are optional arguments.

NOTE: A few functions take no arguments. For example, you don't need to tell the TODAY() function which day you're talking about. Similarly, the NOW() function needs no arguments to return the current date and time, and the NA() function simply enters #(N/A) in a cell to indicate that the information is not available. Even when a function takes no arguments, you still need to include the parentheses to make Excel recognize the function.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.186.202