A Collaborative News Blog

Online Homes Buy is a Collaborative News Blog for Blogger. Post here and get a quality backlinks, increase your pagerank instantly
 

Tutorial : Make Your own function in Microsoft Excel

You should be familiar with Microsoft Excel. Yes, Microsoft Excel is a spreadsheet program from Microsoft Office Package. It is a powerful and popular spreadsheet program, at least 8 from 10 computer user, I bet use this program for their spreadsheet reporting.

Using MS Excel is easy. You can perform any complicated calculation with this program, as well as preparing a report without much steps. Microsoft Excel uses in many fields including Accounting, Engineering and even daily reporting.

To perform calculation, there’s many built-in function available, ranging from Financial, Trigonometric, Text etc. To call this function is easy. Just put “=” or “+” in front of your value, call the function name, set the argument and your function will calculate any value automatically. But sometimes, we need our own function which is not listed there. What can you do?

Every Microsoft Office software supported powerful programming platform : Visual Basic. It’s very easy to understand programming language. Try to follow this step to add your own function:

1. Open Visual Basic Editor by pressing (Alt-F11) or from menu Tools-Macro-Visual Basic Editor

2. In VBA Project, if you do not see any module, you may insert a new module by right click on the left pane and Insert-Module as shown in figure below. If you already have the module, ignore this step and go directly to the next step

Note: your function cannot be called by it’s name if you don’t put in module.

3. Type your own function in the module. For example, you are going to make a function, which compute logical OR based on the binary digit of the number. VBA similar to visual basic can compute this function directly, but MS Excel will only return and false. Let us name this new function BinOr and it will take 2 inputs name a and b. The return value of this function is passed through calling the name of the function. See more explanation about BinOr function below.

Note : You can always check what a specific Visual Basic function do in Help/Microsoft Visual Basic Help. The easiest way is look in Indexed list

visual basic help

4. Now you can close the Visual Basic Editor. How will you use your new function? You may type the name of the function directly inside your spreadsheet. For example, in cell B1 and B2 we input any number and cell B3 is the cell to write the formula, then the formula should be =BinOr(B1,B2)

5. Alternatively, you may use insert function toolbar or menu Insert-Function. If you press the Insert function toolbar, insert function dialog will show up. Click the category “User Defined” from the list and you will find the BinOr function is already in the list. Select the function and press OK button.

6. Function argument dialog will show up and you may input the address of the two arguments or using mouse click. When you press OK button you get the result from your own user-defined function.

Well, easy isn’t?. Try yourself!

Note : You can improve this tutorial with your own function

Need an interactive tutorial?. Here is your flash interactive tutorial on this subject.

download here.


Popularity: 2% [?]

Further reading here...


About Admin

Blogging and, especially Wordpress lover. He can tweak small wordpress code to meet any need. Not a designer, though. Interested in programming world. He loves PHP and Visual Basic. You can argue, but I think, wordpress platform is the best blog platform today. Website | Email


2 Responses to 'Tutorial : Make Your own function in Microsoft Excel'

  1. Tutorial : Make Your own function in Microsoft Excel | Online … | learnexcelfast.info - June 27th, 2009 at 3:20 pm

    [...] by john on Jun.16, 2009, under Object You should be old with Microsoft Excel . Yes, Microsoft Excel is a spreadsheet information from Microsoft Office Package. It is a coercive and favourite spreadsheet program, at small 8 from 10 machine user, I look ingest this information for … View post: Tutorial : Make Your possess duty in Microsoft Excel | Online … [...]

  2. KonstantinMiller - July 7th, 2009 at 2:19 am

    I think I will try to recommend this post to my friends and family, cuz it’s really helpful.

Leave a Reply


Don’t Miss a Thing, Subscribe Here
Onlinehomesbuy Feedburner


My Stats
Promote Your Site Here
My Alexa Rank
Chat with Me
  • Partner links