Book Image

Minitab Cookbook

By : Isaac A Newton
Book Image

Minitab Cookbook

By: Isaac A Newton

Overview of this book

Table of Contents (19 chapters)
Minitab Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 in the file menu. Then open the Gsession.mac file, which was created in Notepad in the previous recipe. Or, open the provided catch-up file.

How to do it…

The following commands will convert the Global macro from the previous recipe into a Local macro...