##### VBA Macros : BIBA Module
Back to Dashboard

# System defined Numeric Functions

#### Numeric Functions

A function is a predefined formula that performs calculations using specific values in a particular order. Excel includes many common functions that can be used to quickly find the sum, average, count, maximum value, and minimum value for a range of cells. In order to use functions correctly, you’ll need to understand the different parts of a function and how to create arguments to calculate values and cell references. In order to work correctly, a function must be written a specific way, which is called the syntax. The basic syntax for a function is the equals sign (=), the function name (SUM, for example), and one or more arguments. Arguments contain the information you want to calculate. The function in the example below would add the values of the cell range A1:A20. Working with arguments

Arguments can refer to both individual cells and cell ranges and must be enclosed within parentheses. You can include one argument or multiple arguments, depending on the syntax required for the function. For example, the function =AVERAGE(B1:B9) would calculate the average of the values in the cell range B1:B9. This function contains only one argument. Multiple arguments must be separated by a comma. For example, the function =SUM(A1:A3, C1:C2, E1) will add the values of all of the cells in the three arguments.

Creating a Function

There are a variety of functions available in Excel. Here are some of the most common functions:

• 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 enter a function manually

If you already know the function name, you can easily type it yourself. In the example below (a tally of cookie sales), we’ll use the AVERAGE function to calculate the average number of units sold by each troop.

1. Select the cellthat will contain the function.
2. Type the equals sign (=),and enter the desired function name. You can also select the desired function from the list of suggested functions that appears below the cell as you type. In our example, we’ll type =AVERAGE.
3. Enter the cell rangefor the argument inside parentheses. In our example, we’ll type (C3:C9). This formula will add the values of cells C3:C9, then divide that value by the total number of values in the range.
4. Press Enteron your keyboard. The function will be calculated, and the result will appear in the cell. In our example, the average number of units sold by each troop is 849.