How is the macro created?
First, create a datafile and set up the necessary cells. Datafile CellFunctionDemo.sta (available in the Examples\Macros directory which can be found in the directory in which you installed STATISTICA) contains prices for various items on a holiday shopping list. Note that in the spreadsheet shown, the Item Cost and Coupon variables are data input variables and the Final Item Cost and Total Cost of All Items variables are derived or computed variables. Entering the computations for derived cells (programming the DataChanged event). After entering the basic information, using the View menu, select Events – View Code. This displays the SVB program editor for document level events (i.e., events that apply to the newly created spreadsheet document). In the Object box of the SVB editor (Document Events dialog), select Document; in the Proc box, select the DataChanged event. Shown below is the appearance of the SVB editor after the DataChanged subroutine has been created in the editor. Now t