1 / 36

Excel Functions

Excel Functions. Part 1. Introduction. An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the Excel spreadsheet. For example, the sum of two variables can be evaluated in an Excel spreadsheet as follows :.

zelda
Download Presentation

Excel Functions

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Excel Functions

  2. Part 1. Introduction

  3. An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the Excel spreadsheet.

  4. For example, the sum of two variables can be evaluated in an Excel spreadsheet as follows:

  5. Sum of two variables in an Excel spreadsheet

  6. This same sum can be done in the environment of Visual Basic (VB)

  7. You can define a function called "Sum", which receives the value of two inputs "x" and "y" and returns the value of the sum of them

  8. How to build the function "Sum"

  9. - Click on the "Programmer" tab

  10. If the tab is not available, see Note 1 "Activate tab" at the end of the document. - Click on the "Programmer" tab

  11. - Click on the "Programmer" tab

  12. Clickon "viewcode"

  13. The "Visual Basic" ambient is open

  14. Function code

  15. Function code The codes are written in the VB "Modules"

  16. Function code The codes are written in the VB "Modules" To open a module

  17. Function code The codes are written in the VB "Modules" To open a module Click right button on the left side window

  18. Function code The codes are written in the VB "Modules" To open a module Click right button on the left side window It opens a window

  19. Select “Insert”

  20. Click Module

  21. Appears the new created VB module, with the name Module1. This name can be changed later by a more suitable one.

  22. The right window displays a flashing line

  23. The right window displays a flashing line The module is now ready for use

  24. Sum Function Code

  25. Código de la función Suma In the right window type the function name followed by the dependent variables.

  26. Código de la función Suma In the right window type the function name followed by the dependent variables Function Suma(x,y)

  27. Código de la función Suma In the right window type the function name followed by the dependent variables. Function Suma(x,y) When you "Enter", VB automatically puts the final line of the function.

  28. Sum Function Code In the right window type the function name followed by the dependent variables. Function Suma(x,y) End Function

  29. The new code must be written between these two commands.

  30. The new code must be written between these two commands. In this case, the code consists of a single line

  31. The new code must be written between these two commands. In this case, the code consists of a single line Suma = x + y

  32. The complete function looks like

  33. Application of the Sum function in the Excel spreadsheet

  34. End of Part 1. Introduction

  35. Activating the "Programmer" tab

  36. Activating the "Programmer" tab

More Related