Calc Guide

Using a macro as a function
Using the newly created Calc document CalcTestMacros.ods, enter
the formula =NumberFive() (see Figure 298). Calc finds the macro and
calls it.
Figure 298: Use the NumberFive() Macro
as a Calc function
Tip
Function names are not case sensitive. In Figure 298, you can
enter =NumberFive() and Calc clearly shows =NUMBERFIVE().
Save the Calc document, close it, and open it again. Depending on your
settings in Tools > Options > OpenOffice.org > Security > Macro
Security, Calc will dislay the warning shown in Figure 299 or the one
shown in Figure 300. You will need to click Enable Macros, or Calc
will not allow any macros to be run inside the document. If you do not
expect a document to contain a macro, it is safer to click Disable
Macros in case the macro is a virus.
Figure 299: OOo warns you that a document contains macros
348 OpenOffice.org 3.x Calc Guide