Excel 2013
Functions
Creating a function
Excel has a variety of functions available. Here are some of the most common functions you'll use:
- SUM: This function adds all of the values of the cells in the argument.
- AVERAGE: This function determines the average of the values included in the argument. It calculates the sum of the cells and then divides that value by the number of cells in the argument.
- COUNT: This function counts the number of cells with numerical data in the argument. This function is useful for quickly counting items in a cell range.
- MAX: This function determines the highest cell value included in the argument.
- MIN: This function determines the lowest cell value included in the argument.
To create a basic function:
In our example below, we'll create a basic function to calculate the average price per unit for a list of recently ordered items using the AVERAGE function.
- Select the cell that will contain the function. In our example, we'll select cell C11.
Selecting cell C11
- Type the equals sign (=) and enter the desired function name. You can also select the desired function from the list of suggested functions that will appear below the cell as you type. In our example, we'll type =AVERAGE.
Entering the AVERAGE function - Enter the cell range for the argument inside parentheses. In our example, we'll type (C3:C10). This formula will add the values of cells C3:C10 and then divide that value by the total number of cells in the range to determine the average.
Creating an argument - Press Enter on your keyboard. The function will be calculated, and the result will appear in the cell. In our example, the average price per unit of items ordered was $15.93.
The completed function and calculated value
Excel will not always tell you if your formula contains an error, so it's up to you to check all of your formulas. To learn how to do this, read the Double-Check Your Formulas lesson from our Excel Formulas tutorial.
To create a function using the AutoSum command:
The AutoSum command allows you to automatically insert the most common functions into your formula, including SUM, AVERAGE, COUNT, MIN, and MAX. In our example below, we'll create a function to calculate the total cost for a list of recently ordered items using the SUM function.
- Select the cell that will contain the function. In our example, we'll select cell D12.
Selecting cell D12
- In the Editing group on the Home tab, locate and select the arrow next to the AutoSum command and then choose the desired function from the drop-down menu. In our example, we'll select Sum.
Selecting Sum from the AutoSum command drop-down menu - The selected function will appear in the cell. If logically placed, the AutoSum command will automatically select a cell range for the argument. In our example, cells D3:D11 were selected automatically and their values will be added together to calculate the total cost. You can also manually enter the desired cell range into the argument.
The inserted function and automatically selected cell range
- Press Enter on your keyboard. The function will be calculated, and the result will appear in the cell. In our example, the sum of D3:D11 is $606.05.
The completed function and calculated value
The AutoSum command can also be accessed from the Formulas tab on the Ribbon.