11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

620<br />

Part VI: Developing Custom Worksheet Functions<br />

Using the Insert Function Dialog Box<br />

Excel’s Insert Function dialog box is a handy tool that enables you to choose a particular worksheet<br />

function from a list of available functions. The Insert Function dialog box also displays a list<br />

of your custom worksheet functions and prompts you for the function’s arguments.<br />

Custom Function procedures defined with the Private keyword don’t appear in the<br />

Insert Function dialog box. Declaring a function as Private is useful if you create functions<br />

that are intended to be used by other VBA procedures rather than in a formula.<br />

By default, custom functions are listed under the User Defined category, but you can have them<br />

appear under a different category. You also can add some text that describes the function.<br />

Adding a function description<br />

When you select one of Excel’s built-in functions in the Insert Function dialog box, a brief<br />

description of the function appears (see Figure 23-3). You may want to provide such a description<br />

for the custom functions that you create.<br />

Figure 23-3: Excel’s Insert Function dialog box displays a brief description of the selected function.<br />

If you don’t provide a description for your custom function, the Insert Function dialog<br />

box displays the following text: No help available.<br />

The following steps describe how to provide a description for a custom function:<br />

1. Create your function in the VB Editor.<br />

2. Activate Excel and choose Developer➜Code➜Macros (or press Alt+F8).<br />

The Macro dialog box lists available Sub procedures but not functions.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!