Different Functions Of Microsoft Excel

broken image


All Excel Functions and Formulas (Short Explanations) by melih Published April 11, 2013 Updated May 4, 2014 In this post, you will find almost all excel functions and formulas in groups with short descriptions. Formulas and Functions. By adding formulas and functions to your Excel sheet, you instantly gain access to a wealth of information regarding your data and can conduct complex calculations with ease. These shortcuts can help Excel beginners and even advanced users begin building formulas and functions, as well as receive help where necessary. The first function anyone should know tells Excel to carry out basic arithmetic. Let's say you wanted the numbers in cell A2 and cell B2 to be added together in cell C2. All you'd do is enter.

-->

Applies to: Excel 2013 | Office 2013 | Visual Studio

Microsoft Excel recognizes two very different types of added functionality: commands and functions.

Commands

In Excel, commands have the following characteristics:

  • They perform actions in the same way that users do.

  • They can do anything a user can do (subject to the limits of the interface used), such as altering Excel settings, opening, closing, and editing documents, initiating recalculations, and so on.

  • They can be set up to be called when certain trapped events occur.

  • They can display dialog boxes and interact with the user.

  • They can be linked to control objects so that they are called when some action is taken on that object, such as left-clicking.

  • They are never called by Excel during a recalculation.

  • They cannot be called by functions during a recalculation.

Functions

Functions in Excel do the following:

Types of functions in excel
  • They usually take arguments and always return a result.

  • They can be entered into one or more cells as part of an Excel formula.

  • They can be used in defined name definitions.

  • They can be used in conditional formatting limit and threshold expressions.

  • They can be called by commands.

  • They cannot call commands.

Excel makes a further distinction between user-defined worksheet functions and user-defined functions that are designed to work on macro sheets. Excel does not limit user-defined macro sheet functions only to being used on macro sheets: these functions can be used anywhere a normal worksheet function can be used.

Worksheet Functions

The following is true of Excel worksheet functions:

  • They cannot access macro sheet information functions.

  • They cannot obtain the values of uncalculated cells.

  • They can be written and registered as thread-safe starting in Excel 2007.

Macro-Sheet Functions

The following is true of Excel macro-sheet functions:

  • They can access macro sheet information functions.

  • They can obtain the values of uncalculated cells including the values of the calling cells.

  • They are not considered thread safe starting in Excel 2007.

How Excel treats a user-defined function (UDF), what it permits the function to do, and how it recalculates the function are all determined when you register the function. If a function is registered as a worksheet function but tries to do something that only a macro-sheet function can do, the operation fails. Starting in Excel 2007, if a worksheet function registered as thread safe tries to call a macro sheet function, again, the operation fails.

Excel treats Microsoft Visual Basic for Applications (VBA) UDFs as macro sheet-equivalent functions, in that they can access workspace information and the value of uncalculated cells, and they are not considered as thread safe starting in Excel 2007.

Excel States

Excel can be in one of a number of states at any given time depending on the actions of the user, an external process, a trapped event running a macro, or a timed Excel housekeeping event such as Autosave.

The states that the user experiences are as follows:

  • Ready state: No commands or macros are being run. No dialog boxes are being displayed. No cells are being edited and the user is not in the middle of a cut/copy and paste operation. No embedded object has focus.

  • Edit mode: The user has started to type valid input characters into an unlocked or unprotected cell, or has pressed F2 on one or more unlocked or unprotected cells.

  • Cut/copy and paste mode: The user has cut or copied a cell or range of cells and has not yet pasted them, or has pasted them using the paste-special dialog box, which enables multiple paste operations.

  • Point mode: The user is editing a formula and is selecting cells whose addresses are added to the formula being edited.

The user can clear the edit, point, and cut/copy modes by pressing the ESC key, which returns Excel to its ready state. Other events can clear these states, such as the following:

  • The user opens a built-in dialog box.

  • The user initiates a recalculation.

  • The user runs a command.

  • Excel performs an Autosave operation.

  • A timer event is trapped.

The last example is of importance to add-in developers. You should consider the impact of the normal usability of Excel where frequent timer event traps are being set and executed. When this is an important part of your add-in's functionality, you should provide users with an easily accessible way of suspending it, so that they can cut/copy and paste normally when they need to.

See also

Lesson 16: Functions

/en/excel2016/relative-and-absolute-cell-references/content/

Introduction

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.

Optional: Download our practice workbook.

Watch the video below to learn more about working with functions.

The parts of a function

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 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 highestcell value included in the argument.
  • MIN: This function determines the lowest cell value included in the argument.

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 the example below, we'll use the SUM function to calculate the total cost for a list of recently ordered items.

  1. Select the cell that will contain the function. In our example, we'll select cell D13.
  2. In the Editing group on the Home tab, click the arrow next to the AutoSum command. Next, choose the desired function from the drop-down menu. In our example, we'll select Sum.
  3. Excel will place the function in the cell and automatically select a cell range for the argument. In our example, cells D3:D12 were selected automatically; their values will be added to calculate the total cost. If Excel selects the wrong cell range, you can manually enter the desired cells into the argument.
  4. 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:D12 is $765.29.

The AutoSum command can also be accessed from the Formulas tab on the Ribbon.

You can also use the Alt+= keyboard shortcut instead of the AutoSum command. To use this shortcut, hold down the Alt key and then press the equals sign.

Microsoft excel formulas and functions
  • They usually take arguments and always return a result.

  • They can be entered into one or more cells as part of an Excel formula.

  • They can be used in defined name definitions.

  • They can be used in conditional formatting limit and threshold expressions.

  • They can be called by commands.

  • They cannot call commands.

Excel makes a further distinction between user-defined worksheet functions and user-defined functions that are designed to work on macro sheets. Excel does not limit user-defined macro sheet functions only to being used on macro sheets: these functions can be used anywhere a normal worksheet function can be used.

Worksheet Functions

The following is true of Excel worksheet functions:

  • They cannot access macro sheet information functions.

  • They cannot obtain the values of uncalculated cells.

  • They can be written and registered as thread-safe starting in Excel 2007.

Macro-Sheet Functions

The following is true of Excel macro-sheet functions:

  • They can access macro sheet information functions.

  • They can obtain the values of uncalculated cells including the values of the calling cells.

  • They are not considered thread safe starting in Excel 2007.

How Excel treats a user-defined function (UDF), what it permits the function to do, and how it recalculates the function are all determined when you register the function. If a function is registered as a worksheet function but tries to do something that only a macro-sheet function can do, the operation fails. Starting in Excel 2007, if a worksheet function registered as thread safe tries to call a macro sheet function, again, the operation fails.

Excel treats Microsoft Visual Basic for Applications (VBA) UDFs as macro sheet-equivalent functions, in that they can access workspace information and the value of uncalculated cells, and they are not considered as thread safe starting in Excel 2007.

Excel States

Excel can be in one of a number of states at any given time depending on the actions of the user, an external process, a trapped event running a macro, or a timed Excel housekeeping event such as Autosave.

The states that the user experiences are as follows:

  • Ready state: No commands or macros are being run. No dialog boxes are being displayed. No cells are being edited and the user is not in the middle of a cut/copy and paste operation. No embedded object has focus.

  • Edit mode: The user has started to type valid input characters into an unlocked or unprotected cell, or has pressed F2 on one or more unlocked or unprotected cells.

  • Cut/copy and paste mode: The user has cut or copied a cell or range of cells and has not yet pasted them, or has pasted them using the paste-special dialog box, which enables multiple paste operations.

  • Point mode: The user is editing a formula and is selecting cells whose addresses are added to the formula being edited.

The user can clear the edit, point, and cut/copy modes by pressing the ESC key, which returns Excel to its ready state. Other events can clear these states, such as the following:

  • The user opens a built-in dialog box.

  • The user initiates a recalculation.

  • The user runs a command.

  • Excel performs an Autosave operation.

  • A timer event is trapped.

The last example is of importance to add-in developers. You should consider the impact of the normal usability of Excel where frequent timer event traps are being set and executed. When this is an important part of your add-in's functionality, you should provide users with an easily accessible way of suspending it, so that they can cut/copy and paste normally when they need to.

See also

Lesson 16: Functions

/en/excel2016/relative-and-absolute-cell-references/content/

Introduction

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.

Optional: Download our practice workbook.

Watch the video below to learn more about working with functions.

The parts of a function

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 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 highestcell value included in the argument.
  • MIN: This function determines the lowest cell value included in the argument.

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 the example below, we'll use the SUM function to calculate the total cost for a list of recently ordered items.

  1. Select the cell that will contain the function. In our example, we'll select cell D13.
  2. In the Editing group on the Home tab, click the arrow next to the AutoSum command. Next, choose the desired function from the drop-down menu. In our example, we'll select Sum.
  3. Excel will place the function in the cell and automatically select a cell range for the argument. In our example, cells D3:D12 were selected automatically; their values will be added to calculate the total cost. If Excel selects the wrong cell range, you can manually enter the desired cells into the argument.
  4. 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:D12 is $765.29.

The AutoSum command can also be accessed from the Formulas tab on the Ribbon.

You can also use the Alt+= keyboard shortcut instead of the AutoSum command. To use this shortcut, hold down the Alt key and then press the equals sign.

Watch the video below to see this shortcut in action.

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 cell that will contain the function. In our example, we'll select cell C10.
  2. Type the equals sign (=), and enter the desired function name. You can also select the desired function from the list of suggestedfunctions that appears below the cell as you type. In our example, we'll type =AVERAGE.
  3. Enter the cell range for the argumentinside 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 Enter on 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.

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.

The Function Library

While there are hundreds of functions in Excel, the ones you'll use the most will depend on the type of data your workbooks contain. There's no need to learn every single function, but exploring some of the different types of functions will help you as you create new projects. You can even use the Function Library on the Formulas tab to browse functions by category, such as Financial, Logical, Text, and Date & Time.

To access the Function Library, select the Formulas tab on the Ribbon. Look for the Function Library group.

Click the buttons in the interactive below to learn more about the different types of functions in Excel.

To insert a function from the Function Library:

In the example below, we'll use the COUNTA function to count the total number of items in the Items column. Unlike COUNT, COUNTA can be used to tally cells that contain data of any kind, not just numerical data.

  1. Select the cell that will contain the function. In our example, we'll select cell B17.
  2. Click the Formulas tab on the Ribbon to access the Function Library.
  3. From the Function Library group, select the desired function category. In our example, we'll choose More Functions, then hover the mouse over Statistical.
  4. Select the desired function from the drop-down menu. In our example, we'll select the COUNTA function, which will count the number of cells in the Items column that are not empty.
  5. The Function Arguments dialog box will appear. Select the Value1 field, then enter or select the desired cells. In our example, we'll enter the cell range A3:A12. You may continue to add arguments in the Value2 field, but in this case we only want to count the number of cells in the cell range A3:A12.
  6. When you're satisfied, click OK.
  7. The function will be calculated, and the result will appear in the cell. In our example, the result shows that a total of 10 items were ordered.

The Insert Function command

While the Function Library is a great place to browse for functions, sometimes you may prefer to search for one instead. You can do so using the Insert Function command. It may take some trial and error depending on the type of function you're looking for; however, with practice, the Insert Function command can be a powerful way to find a function quickly.

To use the Insert Function command:

In the example below, we want to find a function that will calculate the number of business days it took to receive items after they were ordered. We'll use the dates in columns E and F to calculate the delivery time in column G.

  1. Select the cell that will contain the function. In our example, we'll select cell G3.
  2. Click the Formulas tab on the Ribbon, then click the Insert Function command.
  3. The Insert Function dialog box will appear.
  4. Type a few keywords describing the calculation you want the function to perform, then click Go. In our example, we'll type count days, but you can also search by selecting a category from the drop-down list.
  5. Review the results to find the desired function, then click OK. In our example, we'll choose NETWORKDAYS, which will count the number of business days between the ordered date and received date.
  6. The Function Arguments dialog box will appear. From here, you'll be able to enter or select the cells that will make up the arguments in the function. In our example, we'll enter E3 in the Start_date field and F3 in the End_date field.
  7. When you're satisfied, click OK.
  8. The function will be calculated, and the result will appear in the cell. In our example, the result shows that it took four business days to receive the order.

Types Of Functions In Excel

Like formulas, functions can be copied to adjacent cells. Simply select the cell that contains the function, then click and drag the fill handle over the cells you want to fill. The function will be copied, and values for those cells will be calculated relative to their rows or columns.

To learn more:

If you're comfortable with basic functions, you may want to try a more advanced one like VLOOKUP. Check out our article on How to Use Excel's VLOOKUP Function for more information.

To learn even more about working with functions, visit our Excel Formulas tutorial.

Challenge!

Microsoft Excel Functions And Features

  1. Open our practice workbook.
  2. Click the Challenge tab in the bottom-left of the workbook.
  3. In cell F3, insert a function to calculate the average of the four scores in cells B3:E3.
  4. Use the fill handle to copy your function in cell F3 to cells F4:F17.
  5. In cell B18, use AutoSum to insert a function that calculates the lowest score in cells B3:B17.
  6. In cell B19, use the Function Library to insert a function that calculates the median of the scores in cells B3:B17. Hint: You can find the median function by going to More Functions > Statistical.
  7. In cell B20, create a function to calculate the highest score in cells B3:B17.
  8. Select cells B18:B20, then use the fill handle to copy all three functions you just created to cells C18:F20.
  9. When you're finished, your workbook should look like this:

Microsoft Excel Formulas And Functions

/en/excel2016/basic-tips-for-working-with-data/content/





broken image