XLL+ Class Library (7.0)

Define the function

The next step is to use the XLL+ Function Wizard to generate the code for the Excel add-in function NORMSDIST2().

Select a source file

Make sure that Developer Studio is open and that Tutorial1 is the active project. Open or activate the file Tutorial1.cpp.

Invoke the Function Wizard

In Visual Studio, use the New XLL+ Function item on the Tools menu to start the Function Wizard.

Enter function name

In the Add New Function dialog, fill in the name, NORMSDIST2.

After you click on OK, the main Function Wizard dialog will appear, so that you can enter the definition of the new add-in function.

Add function details

In the XLL+ Function Wizard, set the following fields

Return type: Double
Category: Statistical
Description: Returns the standard normal cumulative distribution function (has a mean of zero and a standard deviation of one)

What do all these fields mean?


The name you enter here will be used as the name of the function visible in Excel and also as the name of the C++ function that implements the add-in function.

Return type

The type of value that will be returned to Excel by the add-in function. In this case "Double" stands for "double-precision floating-point number".


When the function appears in Excel's Formula Wizard, it will appear under the category you enter here.


This description will appear in Excel's Formula Wizard. It will also be inserted into your C++ code as part of the function's header comment.

Next: Add an argument >>