You can use custom-defined macros like native calculation commands in calculation scripts or formulas.
To use a custom-defined macro:
Add the custom-defined macro to the calculation script or formula.
For example, to use the @COUNTRANGE custom-defined macro shown earlier in this chapter, create the following calculation script:
CountMbr = @COUNTRANGE(Sales, Jan:Dec);
Use this calculation script with the Sample.Basic database, or replace “Sales, Jan:Dec” with a range of members in a test database.
Save the calculation script or formula, and then run it as usual.