Stops the normal flow of a macro and calculates it one cell at a time. Running a macro one cell at a time is called single-stepping and is very useful when you are debugging a macro. Use the STEP function, instead of clicking the Step Into button in the Macro dialog box when you want to start single-stepping at a specific line in a macro. The Macro dialog box appears when you click the Macros command (Tools menu, Macro submenu).
Syntax
STEP( )
Remarks
When Microsoft Excel encounters a STEP function, it stops running the macro and displays a dialog box. The dialog box tells you which cell in the macro Microsoft Excel is about to calculate, and what formula is in that cell. You can click Step to carry out the next instruction; click Evaluate to calculate part of the formula; click Halt to interrupt the macro; or click Continue to continue the macro without single-stepping.
When placed at the beginning of a macro, STEP is equivalent to clicking the Macro command on the Tools menu and clicking the Step Into button in the Macro dialog box.
To step through the calculation of a custom function, place the STEP function at the start of the custom function.
Related Functions
HALT Stops all macros from running
RUN Runs a macro
Return to index