You can call any of the supplemental functions found in the Real Statistics Resource Pack from a program or macro that you write yourself using VBA Excel. The procedure for doing this is as follows:
Start by writing your program or macro in the usual way. For example, here is a simplistic example which uses the Real Statistics STDERR function.
Function TestExample() As Variant
TestExample = STDERR(Range(“A1:A5”))
In the VBA development interface (which can be accessed by pressing Alt-F11), click on the Tools menu and select the References… option. On the dialog box that appears click on RealStats. This will give your macro access to all the Real Statistics functions.