Creating a Local macro

Local macros help create more general functions than Global macros or Execs. Rather than running from column references in the worksheet, we send data to a Local macro. This is run internally. On running a Local macro, we identify the data to be sent into the macro. We also need to declare the data type of variables used within the macro.

Here, we will convert the GSession macro from the previous recipe into a Local macro. This will allow us to tell the macro to use a column instead of looking for a specific column name or reference.

At this step, we will also simplify the function by removing the commands for the one sample t-test and one variance test.

Getting ready

Open the Macro data.MTW worksheet by using an open worksheet ...

Get Minitab Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.